Be a part of my Flex performance optimization talk at MAX!
(Note: if you’re a blogger, I’d really appreciate if you’d post a link to this post and spread the word. Thanks in advance!)
Do you have a great Flex performance optimization story to tell? Here’s your chance to get your story and your Flex app up in front of a roomful of Adobe MAX attendees in Chicago in six weeks. I’m giving a talk on how to improve performance in Flex apps, and I’d like a good chunk of the talk to be real-world stories of how developers fixed performance issues. I’ll be talking about what we’ve done for Buzzword, and I’ll go into the new Flex 3 profiler a bit as well.
To be a little more specific, here’s what I’m looking for. Your story should be roughly of the form:
Chapter 1. Something about your app was too slow! Drat.
Chapter 2: You figured out what it the problem was, using your deep understanding of the Flex framework, your wizard ActionScript 3 skills, or maybe just changing or removing things at random until you found a pattern.
Chapter 3: You fixed it! Your app is now a speed demon! Cooooooool.
Epilogue: You now know how to keep future apps from being slow in this particular way, and wish to share this knowledge with a world of developers yearning to build faster apps.
If you’ve got a story at all like this please email me at david at virtub dot com, or just leave a comment below. If I can use your story, you’ll get a mention in the talk, your app will get either a screen shot in the slides, or a demo if it’s practical, and I’ll be making a limited number of T-shirts to give away as well.
One more thing… maybe you’re wondering if I could use brief, simple tips on performance as well as full blown stories. The answer is yes! If that’s what you’ve got to offer, feel free to post or send those in too.
Thanks!
Technorati Tags: Adobe, Performance, Adobe MAX



I'm working on Noteflight, an online music writing application that lets you create, view, print and hear music notation with professional quality, right in your web browser. Work on a score from any computer on the Internet, share it with other users, and embed it in your own pages. Noteflight is free for individual use. Email me at dcoletta at noteflight dot com.

That’s awesome! LOL Funny you should mention this, because just the other night I found a way to dramatically improve the rendering and scrolling performance of saffron. I’ll shoot you an email with the details! Hope all is well! Cheers!
David,
Great idea. I’d love to do a quick spot on how we overcame the slowness of AS3 intropsection in the eBay SDK for San Dimas. Hit me up if you’d like to set it up. I’ll cross post this soon on my blog.
thanks
-adam
—————
http://adamflater.blogspot.com
We at Active Media Architects had to focus heavily on performance issues when developing our Flex-based Activa Live Chat product. This Website live help and support application was meant to run for long periods of time in an enterprise environment, and needed to update and display a very dynamic dataset — realtime visitors on a Website! Because of the demanding nature of the application, memory use and overall CPU usage was always at the top of our minds. Of course, when we were developing Activa Live Chat, we did not have the benefit of the new Flex 3 profiler, so we spent many sleepless nights rebuilding and testing, rebuilding and testing.
We were able to get some of the largest performance benefits by switching out our custom item renderers in the Flex List component. We had been using item renderers derived from the Flex Container class. This type of item renderer came with some additional overhead, as Container offers a lot of functionality not required in an item renderer. By switching to an ActionScript class derived from UIComponent, we were able to greatly reduce the total resource consumption of the system. Of course, this required us to create the layout of the component through ActionScript instead of designing it in Flex Builder, but the performance benefit was well worth our extra efforts.
The other major factor in optimizing Activa Live Chat was relatively simple, but might not be too obvious to people unfamiliar with the garbage collector in Flash/Flex – that is, removing event listeners. Every time an event listener is added to an object, it increases that object’s reference count. That means even when every reference is removed, that object persists in memory until the event listener is also removed – this can create an enormous memory leak! An alternative to this is setting the useWeakReference parameter to addEventListener, which does not increase the reference count, although good programming practices indicate that you should know when you are done with an object. What we did was to carefully track our data objects and build some logic in to determine when the object was no longer needed, so that we could remove the event listeners when appropriate
I’ve been working on a game and performance has been a huge issue for me. I’ve got a game that will consistently involve 300 to 500 movie clips playing in unison.
I’ve tried all sorts of optimizations and very few of them have proved useful.
These are the ones that have.
1) BitmapData: .draw(MovieClip); for Background Elements.
For static background objects it is much faster to draw them to a BitmapData image rather than having them as separate movie clips. This can become too slow or cumbersome if you end up having to make regular changes to this grid but at it’s worst it’s only slightly slower than adding the symbols it represents to the game layer, and at it’s best it will save you tons of time. It’s usefulness is destroyed if you have a multitude of overlapping symbols or if these things need to move. Save it for level Backgrounds, Grids, etc. not for you moving characters.
2)8 bit png images.
Pngs work much faster than vector symbols in flash 9 player and 8 bit pngs are faster than 32 bit pngs.
3)Don’t idly move the parent MovieClip.
My game has multiple camera controls. There’s a zoomed out version that shows the whole play field and a zoomed in version that follows the character. Performance is mostly difficult to maintain at the zoomed extents camera angle due to the number of simultaneous movie clips on the screen. A huge error that I made is that for the zoomed out version I was setting the scale and position of the game board every frame. I figured that if there were no change to the scale or position values then there’d be no performance hit. I was wrong, I added a if(scale changed) to the board placement function and I got an instant boost in heavy load of 5fps, and my max frame rate went from 25fps to 66fps.
thanks to Andy for the memory leak issue.
Actually I’m fighting to create a customize component similar to TreeGrid (you know Flex3 published only few weeks after I bought Flex2..). I have to compose my custom renderer, added to each its own event listener. When I finished I found that when the dataProvider’s data size increases it hardly even moves. Opening and closing a node will take 10sec and more….really depressed
I dont have story about flex optimization , but a good article that I found here http://askmeflash.com/article/9/optimize-flex-swf-filesize-performance-loading