Adobe whitepaper for performance optimization

Published by Manfred Karrer on Monday, 15 of February , 2010 at 22:22

Thibault Imbert from Adobe has published a whitepaper for performance optimization, with a lot of useful information specially targeting Flash Player 10.1 and mobile content.

Some parts sounds somehow strange, like the recommendation to avoid Event Dispatching as for every event an object has to be created. On the other hand they recommend object pooling for reusing objects. So the question pops up, why the native Event Dispatching is not implemented in the way that it benefits from a native object pooling? When performance optimization is leading to bad coding practice, something in the  technology seems to be wrong. The poor method execution performance in Flash is one of these issues.

Here just a few random issues discussed in the paper:

– Setting not used objects explicitely to null helps the garbage collector

– Call dispose() on the BitmapData object when not used anymore

– When using Filters 2 Bitmaps are created and kept in memory. Applying a filter is CPU intense, so try to use pre-rendered Bitmaps instead.

– Deactivate interactive objects when no Mouse interaction is needed (mouseEnabled, mouseChildren)

All in all it is good to see that Adobe is aware of the performance problems and hopefully will push the Flash Player forward using the optimization headroom available at the compiler level and the Flash Player itself. Maybe the current effort to make Flash “ready for mobile” will give us the same performance boost like with AS3 that was primarily introduced because of the greed of Flex which simply didn´t perform on the AVM1.

Comments (2)

Category: Actionscript,Compiler,Flash,Flashplayer

2 Comments

Comment by Gabriela

Made Wednesday, 17 of February , 2010 at 11:37

Hi, Manfred.
Would this apply also to FP 10.1 running on browsers?

Comment by Manfred Karrer

Made Wednesday, 17 of February , 2010 at 11:45

some topics only apply to mobile content or the iphone package. but many are general best practice advices. they put some notes to the parts which are only mobile related…

Sorry, the comment form is closed at this time.