Skip navigation
Currently Being Moderated

Capture performance of a screen

Feb 9, 2013 4:11 PM

How do I capture performance profile of a particular screen, for example,  popup?

 

Thanks

 
Replies
  • Currently Being Moderated
    Feb 9, 2013 8:44 PM   in reply to Zolotoj

    Next the the performance snapshot button is this thing that is supposed to look like an eraser.  The tooltip should say something like “clear performance data”.  Normally, you would hit the clear button then open the popup then take your snapshot.  If you need more pinpoint control, you can use the flash.sampler.* APIs to call clearSamples and stopSampling so you don’t get extraneous stuff in your report, but most of the time that stuff doesn’t show up in the top 30 so it doesn’t matter.

     

    I’m not going to analyze the screenshot you posted.  I will wait until you post one you feel contains the right data.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 8:57 PM   in reply to Zolotoj

    If you look at the top 30, some of them are called by things higher up, so you can’t add it all up and get the total run time.  So for me, I never worry about the actual numbers I see in the time columns, I just trust that they are in the right order.

     

    Whether there are [] methods or not isn’t that important.  All you are saying is that your code and flex code is dwarfing the player code.

     

    Feel free to post the snapshot if you want.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2013 9:48 AM   in reply to Zolotoj

    This is for a popup?

     

    OK, here’s what I see in the snapshot:

     

    1) UIComponent.initialize()  - This gets called once per UIComponent instance.  This means that in the duration of this sample, 2236 UIComponents were created.  That is way more than I would expect, even for a full screen popup with a DataGrid.  Most of the time when I see this, folks are using creationPolicy=”all”.  Yes, I know not using makes some code harder to write, but that’s the price you pay.

    2) LayoutManager.doPhasedInstantiation() - This gets called 3 times in a well-behaved popup.  Maybe 6 times if data is loaded later.  The report says it was called 32 times, which indicates excessive invalidation.  Binding component sizes and positions to other component’s sizes and position can sometimes cause this.

    3) UIComponent.addChildAt() - This report says that some 1741 children were added to the display list.  It could be due to creationPolicy problems, or else some other code is causing children to be added and removed.  Maybe if you are swapping in skins late in the game you can get that to happen.

    4) Responder.result – This report says that 143 network results returned during the sample.  That’s an awful lot of data or at least requests.  And if the result event causes the UI to re-do itself that will result in lots of UIComponents being created and added to the display list.

     

    So, while code from your packages are in the top 6, the question is whether those methods get invoked by all of this network results activity or vice-versa.

     

    HTH,

    -Alex

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points