MovieClip optimizations - PR

Soo … since I had this PR in there for quite a while, and since it got no feedback, I was wondering how I’d go about having it accepted:

Especially if you have a bunch of MovieClips from Flash, and intend to keep using those, this should give you a boost in performance. At the moment, to calculate the position of the individual symbols, the MovieClip class will go through all the previous frames - on every frame. So, on a MovieClip with 100 frames, a total of ~5000 frames are accessed. With the PR, only 100 frames are accessed.

This cleans up a few of the TODOs in there. I realize there might be bugs (that’s why we test in develop, right?) - I haven’t run into any so far. It works perfectly for me, on 100+ MovieClips I’ve tested it on.

Is anyone else interested in testing it as well, and what would the next steps be? Keeping my local branch in sync is a bunch of work.

1 Like

There’s a new OpenFL project under “test/haxelib/functional”

It has a tests which follow a basic pattern, in start they can add to the content Sprite, and in stop they should unload any changes they made, just to keep the tests clean.

I think it would be awesome to include some small SWF content as a MovieClipTest1 in there that we can use to put some eyes on MovieClip functionality. We won’t cover all corner cases, but this will begin to form the basis for having a way to confirm that SWF-based changes are indeed working properly. The lack of testing is really the primary reason for hesitation in including the improvements.

Thank you so much :smile: