Flash Render Profiling

Posted: February 23rd, 2009 under ActionScript 3.0.

Flash Render Profiling Demo

Use this tool and purge your projects of lethargic art assets!


I am going to show you how to use my Flash render profiling tool. The source, available under GNU general public license, is available here. Since you only need basic Flash editor knowledge to use this tool, it should be easy for an artist, designer, or producer to use and take an active role in the optimization of rendering.

I do not want to reiterate everything in the video but I do want to mention a few key points. All you need to do is drag objects from the library onto the stage and run the application. The code automatically searches the render tree and tests every art asset. In the video, I point out where you can add objects to the stage using ActionScript. My first experiment compared the render speed of a complex object created in ActionScript and the same object using the Flash editor, there was no appreciable difference. You will get the same results from just dragging objects onto the stage as you would with coding them in ActionScript.

I use the same methodology for this tool as I did in my benchmarking tests. To have accurate results you need to accumulate a significant amount of time to measure, give the system enough time to recover between tests, and conduct multiple trials. Testing in the right environment is paramount, rendering time differs greatly between a local Flash player, debugging from the Flash editor, and running from a web browser.

It takes time to be accurate, and this tool certainly takes some time to do its job, but it would take far more time to find rendering bottlenecks by guessing. There is no comparison to knowing. This render profiler will let you target sources for optimization with surgical precision, and let you compare the results of your changes.

Thanks for reading, and remember, we are all in this together.

Bookmark this on Delicious

5 Comments »

  • Comment by Jordan — February 26, 2009 @ 12:08 pm

    1

    Awesome! Thanks a lot for this tool, really helpful!


  • Comment by Tommy Chong — March 4, 2009 @ 4:27 am

    2

    Awesome. Like the new links too!


  • Comment by Tony — March 10, 2010 @ 7:33 pm

    3

    Is this utility suitable for testing assets that are animating while the test runs? I’m testing an art asset from an old project that consists of an animating character overlayed with several alpha masks, and dozens of complex vector shapes all moving around the screen at once. I frequently run into Actionscript Timeout errors.


  • Comment by Stephen Calender — March 27, 2010 @ 4:17 pm

    4

    Sorry Tony, I thought that I made it clear that this wasn’t a run time tool. You shouldn’t have things animating while this code is trying to run. Moving objects around the screen will be pretty light weight. If you want to see how much time you spend drawing graphics you will need to splice your animations into a bunch of single frame movie clips (that is, unless you want to write the code to make it iterate through every frame of clips and sub clips).


  • Pingback by Flash Game Development Inter-web mash up: Feb 24, 2009 « 8bitrocket.com — August 13, 2013 @ 9:34 am

    5

    [...] From the blogs – Are you interested in entering the 4K game contest? There have been some optimization discussions on GYW, Photon Storm, Urbansquall (From the great Tony Pa) and 8bitrocket (here, here and here). – From the Gambrinous blog (new to this round-up) : Multiplayer v. Single Player: Opposite Design Goals – Sokay.net has a great new layout and look. – Edge Online's Future of Games is Flash Article – Stephen Calender's Flash Render Profiling [...]


RSS feed for comments on this post. TrackBack URL

Leave a comment