2 Replies Latest reply on Nov 3, 2009 11:15 AM by Flex harUI

    A weird performance issue

    ahatest

      An air program will process many text files,
      click run button to go through these text files one by one.

       

      *Problems*:
      Click run button, then the air program's performance is OK.
      Click run button again, then the air program's performance maybe OK or may not OK.(about 50-60% is NOT OK)
      Click run button again, then the air program's performance is OK.
      ... ...

       

      Then, seems only the second run may have the performance issue.
      So weird?
      In fact, each run should do the same thing.
      BTW, the busy cursor is a clock, when running slow, the clock cursor also run slowly.

       

      *About profiler*:
      And I also use Flex builder profiler to analyse.
      For example,
      for good run,
      elapse time: 2min
      the biggest cumulative function time: 1min

       

      for abnormal run:
      elapse time: 7min
      the biggest cumulative function time: about 4 min

       


      *Questions*:
      1. Do you have any general clue or hint on this issue?
      2. About profiler, for example, the elapse time is 7min, but cumulative function time is  only 4 min, where is another 3min? (OS time, or idle time?)
      seems some functions were not be counted by profiler?
      how can I know what costs the another 3 min?

       


      *Backgrounds*:
      1. Windows Vista, Flex builder3, flex sdk3.2, actionscript3
      2. when processing text files, read file, check each line for finding the keyword.
      3. one virtual thread(by timer) is for one text file processing.
      4: any other information need?

       

      Thanks.

        • 1. Re: A weird performance issue
          Bertrand G.

          I wonder if your issue is similar to mine, I am loading 200 pictures, then unloading, call the garbage collector, and load again... The garbage collection works one or two times if I do it fast, and then subsequently the memory increase always at each load.

           

          - and if I wait a little before doing the first load/unload, the garbage collection barely recovers a few Megs.

          - I have been playing quite a bit with the GC, unloading eventListeners, nullifying and removing childElements... nothing will do it!

           

          Anyway I just thought I'd share it so we don't feel so lonely on our struggle!...

          • 2. Re: A weird performance issue
            Flex harUI Adobe Employee

            When you look at the performance profile, you also have to know which cumulative are "roots".  , or and and are "roots' in that they are entry points from the player that generally call your code or do serious work.  So if the cumulative for all these "roots" add up to 7 min, then you have accounted for all the time.

             

            If you grab enough memory, the OS may be paging memory.

             

            Alex Harui

            Flex SDK Developer

            Adobe Systems Inc.

            Blog: http://blogs.adobe.com/aharui