Yesterday, David Keutgens from Cynergy Systems presented Profiling in Flex for our Sydney Adobe Platform User Group. Although not a real Flex programmer myself, I found the presentation quite informative and enjoyable.
The topic also brings back my memory of my undergraduate final year where I almost did a thesis on Java profiling myself, which I didn’t end up doing because it was too hard for me.
Couple of things that I got out of the meeting (again bare in mind I am not a Flex programmer, so there might be inaccuracies below):
- In Flex you can profile 2 things: Memory or Performance. - Need to be careful in cleaning up references to objects, otherwise the Garbage Collector won’t clean them. - Use weak reference as much as possible, two ways of specifying weak reference: - Dictionary class - addListener
- When profiling look at objects that are called often or object that has long execution time.
Memorable comment on the night:
Q: What do you call a class that implements Dictionary but always use weak reference by default?
A: Wikipedia
LOL, attributed to Robin Hilliard of Rocketboots.