Flash Network Profiler – What are YOU downloading?
FlashPreloadProfiler RC2
Loaders Profiler
This time, it’s all about loading files.
This new 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 don’t have access to:
- – URL of display loader while it being downloaded.
- – URL of URLStream and URLLoader when download is succesful
Configs
There are now real “options” in the profiler.
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.
Project Integration
Did you have trouble with the mm.cfg file? You (like many others) were not able to use the profiler? This time is over.
There is now a SWC in the download section that you can include in your project.
The only thing you have to do is
this.stage.addChild(new FlashPreloadProfiler());
That’s it!
Video
Like the last time, I made a video of the new features:
So what’s the next step?
Until Molehill arrive officialy, I guess it’s going to be NetStream and Sockets.
FlashPreloadProfiler Project home page
If you find bugs, please submit them in the google code project, or let me know with comments here.
Have a nie and optimized day.
Comments are closed.
Hello Jean-Philippe. First of all, thanks for the great tool.
Could you please clear up couple of things about performance profiler tab?
You calculate method invocation duration as a difference between subsequent samples:
//SampleAnalyzer::ProcessSampling
var timeDiff:Number = s.time – lastSampleTime;
Adobes reference says that Sample::time is the duration of the Sample instance, but
actually it looks like kind of timestamp (probably either start of method execution or finish). So we can’t be sure (correct me if I wrong) that timeDiff is really a duration of method invocation. FlashPlayer could execute
method, sleep some time and then start next method. So the timeDiff would be exec time + sleep time.
I created empty project with frameRate = 3 and no graphics and traced accumulated diffTime. It is almost equal to flash app execution time so looks like flashplayer spends all the time at work.
I’m a bit confused. The cpu load is about 0 and I’m expecting that total time spent in methods should be much more less then time since app start. Could you please explain this phenomenon?
Thanks in advance
Well I am no Adobe guy!
I had a hard time trying to solve that puzzle to and the final result seems to match the Flex Profiler ones.
What I can say is that every sample returned for a function time seems to be around 1MS. so if you loop in a function for 50MS, it’s going to send back 50 samples.
Also, the “time” seems to be timestamps, yes.
for the exec time + sleep time, you are right. We can expect that behavior. What I have noticed is that since the internals events tends to match the 1MS pattern, having a “new Event (Enterframe)” taking 20MS was kinda strange. It looks like the VM spend the time there, and between internal events. Hence I computer an approximative free time of 20MS-1MS when it comes to the EnterFrameEvent.
Again, it’s like a puzzle for me too, maybee some day Adobe will release a good technical documentation on the sampler API. It would be great.
I’ll try to dig a bit more into it. I will keep you in the loop!
Cool! I appreciate it.
Didn’t you think about adding some additional runtime statistics like frame render time, user code execution time (per frame)? I’m working at social games company and our very big problem is performance and frame rate degradation. Artists makes many flash movies (game content) and when it is loaded to the game it appears that game’s frame rate become extremely low. And no way to determine what exactly degrades the performance. Such a counter would allow to evaluate ‘weight’ of graphics separately and estimate the ‘capacity’ of application.
Actually I’ve already added render time counter ( here is the screenshot http://img834.imageshack.us/i/fppwithavgrendertime.jpg/ ). I think such a functionality could be useful not only for me but for other developers and I will share the code if you would want to add it to profiler.
I am still not sure for 100% that what I count is exactly the frame render time but my tests with says that it at least close to it.
Send me the code, I’m going to review it and add it to the next release. To know what internal events (render time or code execution time) is taking the most time, try the internal events profiler. (the little blue sheet icon). You will be able to see the “ratio” of times. Still, please send me your sources by mail and i’ll add them later! If you have any other dieas let me know 😉 Thanks a lot!
upFD1S I’m not easily impressed. . . but that’s impressing me! 🙂
Sorry, can’t find you email 😦
diff against revision 44 is here https://gist.github.com/799461
I moved render time duration to internal events profiler tab (also removed a little of dead code). IMHO exact value of render time could be helpful there. At least it is helpful for me 🙂
By the way, probably calls of
SampleAnalyzer.GetInstance().PauseSampling();
SampleAnalyzer.GetInstance().ProcessSampling();
at all *Profiler::Update() methods doing nothing and can be removed cause sampling was already paused at FlashPreloadProfiler::OnEnterFrame()
This is great, JP! I was one of those who had trouble getting the preload SWF to work, so it’ll be really nice to add to projects via conditional compilation (so as to avoid adding 100KB to the release build). Can’t wait to get some time to try it out!
I´m having problems getting this to work in FlashBuilder for Flex projects using “Project Integration” approach. I have added the swc to the project and is adding the profiler to the stage in my init method, i.e. this.stage.addChild(new FlashPreloadProfiler()); after making sure the stage actually exists.
The profiler is displayed, but does not work. Nothing happens when I click any of the buttons such as Runtime Statistics. What am I missing? I compile for FlashPlayer 10, and have tried both a Flex 4 mxml project and a pure Actionscript project.
Using the swf version by configuring the mm.cfg file works just fine though, and using it with Flashdevelop works superb. But it would be great to also have the option to use the “Project Integration” approach, especially for some of my coworkers that prefers using the FlashBuilder IDE and do not want to mess around with the mm.cfg.
Ah, adding the profiler to stage (i.e. stage.addChild) generates a TypeError: Error #1009: Cannot access a property or method of a null object reference. When compiling. The stage does exist though (init() is run after added to stage event),
Adding it within my Sprite does however work fine.
V1kOM3 gjiihonpzmhm
xhMQJr That’s the best answer of all time! JMHO
Any chance you could release this with a GPLv2 or Apache or some other similar commercial entity friendly license? We are forbidden from using any GPLv3 code, even for testing purposes.
I´m having problems the same problem as Bjarne
The profiler is displayed, but does not work. Nothing happens when I click any of the buttons such as Runtime Statistics.
Please i need help i have tried addchild and stage.addchild
Indirect profilier launch (waiting for main SWF to load)
That´s the problem…how to solve?