Time and again the same scenario arises. An app is being built and it’s all going fine until the very end when performance issues start to appear.
Optimizing Flash performance is certainly the most boring part of Flash Platform development but it’s a cornerstone without which you, the Flex developer, can not do without.
An app is worth nothing unless you provide that effortless flow of interaction at all times.
There is not too much information on this topic as it is not the most interesting one but here are some simple guidelines that have helped me tremendously over the time, as well as a few great papers.
Firstly, one simple rule: Don’t try to do too much at the same time. As a RIA developer, figure our a way to engage the user usefully while you spread out the workload so the app doesn’t choke. Remember, we are dealing with people. People don’t need to have something done faster for 14 milliseconds, they need to know what’s going on.
Second simple rule. I know we are all developing on flying fortresses of computers because we need a lot of juice in development. But start testing early on a crappy machine. Not that your end user will necessarily have a crappy machine but it will show tell-tell signs of where the app might need some improvement.
Than for Flex Builder users, do use the Profiler. The more you use it, the more it will make sense and after a while you will start seeing some really useful information that you might have not found out about otherwise.
Other than that, read these articles. They really helped me a lot to understand the way Flash Player works and plan accordingly in the shortest time.
Optimizing Flex Application by David Coletta
David makes a great point: designating between improving actual performance vs. perceived performance. That point is worth gold. Also provides excellent examples/solutions for particular problems.
Garbage Collection from Alex’s Flex Closet
Hardcore nuts and bolts of garbage collection. Look for the link to ppt.
ActionScript 3 Performance Tuning by Matt Chotin
A great overview of what Flash Player does with your code.
Some Actionscript 3.0 Optimizations by Dennis Ippel
Apart from some really nice examples, there is a list of references for Flash optimization at the bottom of the post.
And at the end, seeing is beliveing. Try these suggestions and see for yourself what makes a difference.
