8 Replies Latest reply on Dec 21, 2012 8:41 PM by imbert.thibault

    Why do the bars on the Frame Timeline sometimes go grey?

    simon.oconnor

      Loving seeing Scout out in the 'real world' now. It's proving to be a damn fine product for finding performance issues I didn't know I had (pieces of code that run that I didn't really know were running).

       

      While I'm tracing my app, I notice that there are sometimes periods where the coloured bars go a faint grey rather than being colour coded. If I highlight them I still seem to get all the normal information about the code run during that section, but I'm intrigued what it means when they go grey?

        • 1. Re: Why do the bars on the Frame Timeline sometimes go grey?
          kdittyr

          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.

          • 2. Re: Why do the bars on the Frame Timeline sometimes go grey?
            imbert.thibault Adobe Employee

            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.

             

            Thibault

            • 3. Re: Why do the bars on the Frame Timeline sometimes go grey?
              Dennis O'Brien

              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:

              Frame: 414

              Framerate: 9.3 fps

              Target: 30.0 fps

              Total Frame Time:  107 ms

                Active:  3

                  Actionscript:  1

                  DisplayList Rendering:  1

                  Network and Video:  0

                  Other:  1

                Inactive:  104

                  Waiting for GPU:  <1

                  Waiting for Next Frame:  104

               

              Let me know if there is more information I can provide.

               

              Thanks,

              Dennis

              • 4. Re: Why do the bars on the Frame Timeline sometimes go grey?
                Mark E. Shepherd Adobe Employee

                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.

                 

                Regards,

                Mark Shepherd

                Adobe Scout Engineering

                • 5. Re: Why do the bars on the Frame Timeline sometimes go grey?
                  ronson1982 Level 1

                  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.

                  • 6. Re: Why do the bars on the Frame Timeline sometimes go grey?
                    imbert.thibault Adobe Employee

                    Hi Ronson,

                     

                    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!

                     

                    Thibault Imbert

                    Sr. Product Manager | Adobe Scout

                    • 7. Re: Why do the bars on the Frame Timeline sometimes go grey?
                      ronson1982 Level 1

                      Hey Thibault!

                       

                      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.

                       

                      http://imgur.com/IMjRE

                       

                      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).

                       

                       

                      Cheers.

                      • 8. Re: Why do the bars on the Frame Timeline sometimes go grey?
                        imbert.thibault Adobe Employee

                        Hi Ronson,

                         

                        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!

                         

                        Thibault Imbert

                        Sr. Product Manager | Adobe Scout