[Papervision3D] Tweener performance issue

Zeh Fernando zehfernando at zeh.com.br
Sun Feb 24 07:28:37 PST 2008


> So I'm using tweener to adjust the brightness of some MovieMaterials holding
> bitmaps.
> If the tween completes everything seems to be ok.    I can remove the
> materials/bitmaps and readd them back as many times as I want without seeing
> any performance hits or memmory leaks.
> However if I need to interrupt the tweens with Tweener.removeAllTweens();
> and then continue with removing and readding ...  it seems like the bitmap
> data never clears because the performance just goes down hill and the
> memmory starts climing....with every time I add/remove
> So I'm wondering if anyone can suggest what I should do to address this.

If you remove tweens in the middle of a tween, the brightness change to 
the container will still remain. I can't see a way for that to cause 
actual leaks since it doesn't *create* bitmaps, but the container will 
still have filters applied to it (color matrix). So if you do that to a 
lot of containers, because it'll turn on cacheAsBitmap on all of them, 
it can potentially use up a lot of memory and create some slowdown 
during repeated rendering. So if you want to be sure, also try to reset 
the .filters of the container (that'll remove its implied cacheAsBitmap).

New tweenings added to the same container should 'reuse' the filters so 
it wouldn't recreate anything, hence why I can't see that as a leak. But 
other than rogue containers with static filters still applied to them, I 
can't see a reason why memory would go up and performance would go down.

Zeh





More information about the Papervision3D mailing list