If you highlight one of the frames that you are talking about and then look in the "Summary" tab and spin down the "Inactive" list in the "Frame Time" area, does the "Waiting for Next Frame" have a higher number in it? Actually, now that I look at mine and compare the "Waiting for Next Frame" to the "Total Frame Time" they are both 34ms. What that is telling me is that the grey is indicating that the swf is running really efficiently at that point because it is waiting for the next frame rather than processing a bunch actionscript or crunching numbers.
That is correct. If you have some time spent in Waiting for the next frame, this is a good thing. That means the runtime is regulating itself and waits for the next frame. What you want to avoid, is having no time at all spent in waiting for the next frame, it means that that there is too much stuff happening on frames and the runtime is overloaded and cannot spend time regulating. If you have lots of time spent in Waiting for the GPU, this is something else, it means you are asking too much to render on a frame and you are blocking the GPU (which is processing what he has to do on each frame). To avoid this, try minimizing the number of draw calls you have and the number of call to present(). Ideally you want to have one per frame max.
What would cause the inactive time to occasionally spike? I'm testing a game that targets 30 fps and for most of the game we are below that and the grey vertical bars extend to the red horizontal line of 33 milliseconds, but occasionally I see the inactivity time spike. For example:
Framerate: 9.3 fps
Target: 30.0 fps
Total Frame Time: 107 ms
DisplayList Rendering: 1
Network and Video: 0
Waiting for GPU: <1
Waiting for Next Frame: 104
Let me know if there is more information I can provide.
Sometimes "Waiting for Next Frame" times are high because the computer is heavily loaded and other apps are competing with flash player for CPU time. Try turning on CPU Usage recording, and see if the system CPU time is high when you see high Waiting for Next Frame times.
Also, make sure you're using the latest runtime, which is Flash Player 11.5 or Air 3.5, and check the release notes because there are some known problems with certain browsers.
If none of this helps, then it would be great if you could post a .FLM file that illustrates the problem, so we can take a look at it.
Adobe Scout Engineering
Sorry for the newbie question I am new to Scout.
I am trying to make a Starling Game and am at the release for testing stage.
When I put the game onto a device (using 11.5, 3.5, FB4.7) a "Export Build". My game runs poorly but its driving me crazy because I do not know why.
Please see this link: http://imgur.com/yHvoq
I do not know why the grey bars are so large or where they are coming from. They appear to be well above my budget at all times.
Thanks for posting the picture. Can you check which category of inactive time is the time spent on? Waiting for the next frame or waiting for the GPU?
I am pretty sure the time is spent on waiting for the GPU which would be resolved by minimizing the number of draw calls issued by Starling behind the scenes. There is a full section on performance optimizations in the Starling book here: oreilly.com/catalog/0636920024217 - It is a free book, make sure to grab it. By using texture atlases and authoring your assets appropriately, your entire game could require just a few draw calls to run, which would be ideal and would not overload the GPU.
If the time is spent in waiting for the next frame, then it is different. Let me know!
Sr. Product Manager | Adobe Scout
Just to say thanks so much for your work on Scout and your free book which got me to this point! I am unsure where you find the time to do all this and reply to forums!
To keep it brief yeah your right, the majority of time is being spent waiting for the GPU. The "Next Frame" time is very small compared to this.
I want to avoid this thread turning into my project-specific issue.
But I just have a question.
Is there anything else that would specifically cause this problem that is not related to rendering? Yesterday, even with a white screen, a stats counter and "0 draw calls" I get 25-30fps
All this is pointing to either A) How I have structured my game outside of the "display list" or B) I am not managing my textures well (2 texture atlases, but maybe I am asking too many subtextures and not disposing them or something like that).
Thanks for the kind words. I am happy to hear you are enjoying Scout and Starling. According to what you said, it seems like performance is low even with nothing on screen. Have you checked that you exported your swf as a release swf? Not doing so can largely impact the performance.
Let me know!
Sr. Product Manager | Adobe Scout