In one of my previous posts I showed tool that can measure actual frame per second of your applications. I noticed that some times it is not enough to analyze performance of application, so I decided to create more sophisticated tool. Often flash player's cycle Adobe displays as "Ellastic Racetrack" (see http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/). I wrote tool that can visually show that racetrack on the screen. It gathers information of code execution and rendering times during some interval (configurable, by default 1 sec.) and draws on the screen two racetracks that represents heaviest code execution frame and heaviest rendering frame.
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
ReplyDeleteshould be replaced with
addEventListener(FlexEvent.CREATION_COMPLETE, addedToStageHandler);
because addedToStageHandler is called before createChildren and causes null reference on timer.start().
RENDER_FRAME event can be skiped on some frames. EXIT_FRAME event can be used to measure code execution time instead of assigning default 33ms (time between two ENTER_FRAME events ) to code execution time in this case.
ReplyDeleteIt also should be noted that there is no way to pricisely measure if rendering time is lower then (33ms - codeExecutionTime).
The project is open source and hosting page is here http://code.google.com/p/elastic-racetrack/. I would highly appreciate you if you can improve project. just send me name and I will add you as committer into project
Delete