FlashPreloadProfiler in FlashFireBug
*note: FlashPreloadProfiler is not in development anymore, but has been included in FlashFireBug as a good profiling toolkit. FlashPreloadProfiler as leveled-up in a more professional project called TheMiner which is not the version included in FlashFireBug.
FlashPreloadProfiler Last (major) update on 2011/01/24 : Now in RC2
- Added Loaders Profiler
- Added Configs tab and lots of options
- Better integration with SWC
FlashPreloadProfiler was an open source multi-purpose profiler designed to help productivity and stability during development by exposing “under the hood” representation of any flash scene.
The main goal is to help expose and diagnose problems before they get too big.
It enables developers, artists, designer or testers to see what sometimes “cannot be seen” such as:
- What is the current FPS and memory statistics of a SWF
- Where are all mouse event listeners object
- What is the global scene overdraw
How many sprites are contained in the scene and may be one over the others
- What is the life cycle of all the display objects on the stage
Instanciation, AddedToStage, RemovedFromStage, Garbage Collection
- Memory profiler
- Function performance profiler
- Internal event frame division
Advantages (Over Flash Builder Profiler)
- First, it’s free! So it cost a few hundreds less than the Adobe Flex Profiler. If you like my work, you can donate at the bottom of this page
- The profiler is very compact and don’t need any external tool.
- The whole profiling result is showed in a transparent UI enabling easy integration
- You have access to more profiling tools
Overdraw graphMouse listeners graphInternal events time repartitionInstanciation Statistics/StackTrace? for all object (including Temporary object)Loader profilingSampling data “Dump”Can hook on ANY flash app, local or web, debug or release, yours or others.
Some the following demos use this very cool particle system
Video tutorial with example
This is a full video tutorial covering every feature of the profiler.
The video has been “cutted” at 15 minutes due to youtube limitation. Sorry for that.
*the profiler is on the top-left corner of the application
Features in RC1
Features in RC2:
Here is the Basic interface.
The part on the right is only visible in some of the options.
This option let you hide any of the previously selected options. Keeping only the option menu visible.
This profiler show the most common profiling information such as current FPS, current memory usage and max memory
* The two graphs are showing FPS history and memory history over a few seconds.
* The FPS graph show smaller vertical bar when FPS is low
* The Memory graph draws a line at current memory position, and slowly fades out everything.
This profiler enables you to see any object that has mouseEnable=true, and all object with mouse listeners linked on.
* Draw gray boxes around object with mouseEnable=true
* Draw green boxes around object with any move-related MouseListener (Mouse over, out, move)
* Draw yellow boxes around object with any click-related MouseListener (Button up, down, click, double-click)
This profiler let you see all DisplayObject currently on stage, it draw a semi-transparent box around all object and show the number of object currently on stage, and the max depth encountered. The depth is the number of sub-child levels.
* In gray, al basic object
* In yellow all invisible object (visible=false or alpha=0)
Display Objects Lifecycle
Use this profiler to have a visual feedback for object added to stage, removed from stage and object waiting for GC.
The profiler will:
* Blink a yellow box around a newly created object added to stage
* Blink a red box around a re-used object added to stage
* Blink a blue box around any object removed from stage
* Draw a green rectangle over sprite waiting for garbage collection
This shows a list of the most frequently allocated objects
For now, it is only sorted by cumulative instance count
There are four columns:
The fully qualified class name of an object
How many times that object has been instanciated since the last refresh
How many times that object has been delete (collected) since the last refresh
# Current count
How many object of this time are currently living (Starting when this option has been selected)
# Current count
How many object of this time have been instanciated (Starting when this option has been selected)
Frame Time distribution
This options let you see how the time is divided between different processes
There is a color for (almost all) internal event kind:
At each refresh, the proportional time is calculated for each event type, and then rendered as a single horizontal line.
This shows a list of the functions that take the most time to execute
The columns are:
-Name of the function
-Self time in microsecond
-self time in % (self / totalTime of all functions)
-total in microsecond of a function and it’s calees
-total in % of a function and it’s calees
You can view (and copy) the function stack by click the little stack icon on the left of each line.
This profiler show you every file being loaded using
- - flash.display.Loader
- - flash.net.URLStream
- - flash.net.URLLoader
The profiling is simple, it’s going to show:
- - Current download progress
- - HTTP Status
- - File Size
- - File Url (for every display Loaders, and URLStream with IOError)
You can copy to clipboard the URL or the Errors with the left side icons.
You can also save the whole list of downloads with a “save all” option
You can decide to turn On and Off most of the feature so that they are not processed when you don’t need them.
You can also decide to launch the profilers you want “in the baclground” before the profiled SWF is started so that you don’t miss any information.
This new feature let you browse between tabs without loosing the data in each one.
You can also activate DeMonsterDebugger in the new Config Panel.
Toggle Record/Save to clipboard Sampling data
When clicking this icon, you will start recording sampling data
When click for a second time, the data will be processed and save in your clipboard.
The data saved is separated by “tabs” so that you can paste it in excel and manage it the way you want. You can also sort the data with grid sorting.
The data recorded will have all object instantiated, deleted and all events that happened during the recording.
*You will also be able to see temporary object instantiation (which you cannot in FlashBuilder Profiler)*
This save the whole list of object instanciations stattistics into the clipboard.
When you click on the object instanciation stats tab, you only see the TOP20, but when saving whit this option you get the whole list, and each value is separated with a “tab” so that you can edit and sort it easily in excel.
Trigger (sync) Garbage Collector
Simply trigger a sync Garbage collection using the LocalConnection trick.
Note: This do not collect the ZCR (Reap)
ProfilerUI transparency controller
Make the interface more or less transparent
Sampling refresh rate controller
Make the sampling refresh rate faster / slower.
The Monster Debugger
If the Icon is gray with a bar, it means the feature is completly turned off.
To turn on this option, you must add special argument to the preloadSWF. (see the blog post to know how it works)
If gray (with no bar) it means the tools isn’t connected right now.
If the icon is in color, it means the connection is active.
This version is now included in FlashFireBug (http://www.o-minds.com/products/flashfirebug)
FlashPreloadProfiler has leveled-up in a new project called TheMiner
You can view check it out here: