October 7th, 2007
MAX 2007 – Optimizing ActionScript 3.0 – Slides and Demos
So…got around to posting my slides and demos for the presentation I did at MAX 2007, you can get to them from RealEyes Media Labs or use this direct link. By the way, the demos were designed to work with REDbug Console right out of the box, so you’ll need to go grab that –> REDbug Console
Just so you know, the slides and demos I have at the links mentioned in this post are a newer revision than the ones I had uploaded to the MAX presentation library. They were revised between my sessions 1 and 2 after some outstanding input from the crowd.
Although I didn’t have time to test and add everything I heard from the crowd to my presentation, it’s amazing the things you can find out about when you’re in the room with a bunch of smart developers.
For instance, here are some things I picked up during my sessions:
- A developer at MAX stated that an optimal approach to handling child components during a transition would be to set the visible and includeInLayout properties for the component to false during the effect and set it back to true afterwards. The reason to do it this way is that it prevents a bunch of invalidation processing from running when you add/remove on the display list at the beginning and end of the transition.
- Another developer mentioned that he used the Logging Framework and custom TraceTargets for his debugging code, this made it very easy to comment out the debugging code before going to production and he also got the added benefit of being able to filter messages based on class packages.
- Yet another developer mentioned using linked lists when we were talking about arrays. He said that since object access in AS3 is faster than array access you can use a linked list like an array when performance is key. He also said there was an open source AS3 game developers library out there that implemented them…I’m thinking it’s “AS3 Data Structures For Game Developers“.
The other thing that I thought was fun is that we had some time to play around with the test code based on the curious questions that came from the crowd. For instance:
- We found out that accessing a literal string vs. a variable, vs. a const, vs. a static const, all take roughly the same amount of time.
- When typing array iterators, uints and ints are good, and Number is bad.
- Although a conditional statement surrounding a block of code that will fail is much faster than using try/catch, if the code doesn’t fail, the try/catch statement is comparable to the conditional statement
- Although accessing public properties from a strongly typed object is faster than accessing dynamic properties from a generic object, once you throw getter/setters into the mix the strongly typed property access becomes slower due to having to go through a function
Anyway, thanks everyone who came to my session, and especially those that added input, I appreciate it, I learned some things and hopefully you all did too!
On a closing note, the MAX conference was a blast and Chicago is definitely a swell town! I’ve got some notes on the conference in general and was gonna blog a little about my experience, but right now a little short on time…I also still owe Tom and John a review on 360Flex and have been a total slacker.
So hopefully later this week I’ll pull out my OneNote files to breakdown my experience at 360Flex Seattle just in time for promoting 360Flex Italy! Then when I’ve affirmed that I’m not a total slacker…I’ll post my experience at MAX 2007. In the meantime enjoy the slides and demos, and go play some Halo 3!















October 8th, 2007 at 12:16 am
“The default value of the optimize option is true.”
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?
context=LiveDocs_Book_Parts&file=performance_118_16.html
Which is correct?
=====================================
Pepe,
There was an error in the 201 livedocs. optimize=true is the default. The livedoc comment on this along with an affirmation from one of the Adobe team can be found here:
http://livedocs.adobe.com/flex/201/html/compilers_123_24.html
-Jun
October 8th, 2007 at 12:29 am
Ah…
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/
wwhelp.htm?context=LiveDocs_Book_Parts&file=compilers_123_24.html
See the comment area
“The default should be listed as true – we will update the doc.”
======================================================
You got it!
November 6th, 2007 at 2:41 am
[...] Flex and PHP – Daniel Dura – AIR and Flex – Bits And Bytes With AIR – Integrating Flex and Video – Optimizing ActionScript 3.0 – 20 tips for Flash Lite development – Branding and Protecting Flash Enabled Video – The Blind [...]
May 16th, 2009 at 8:31 pm
I heart air as well. I also heart this blog, great stuff.
http://www.noisydesign.com