4 Replies Latest reply on Nov 5, 2008 11:56 PM by bjt1988

    memory usage - question to handle big applications

    bjt1988
      Hi,

      i have a question:
      My Adobe Air Application is blowing up his memory usage everytime in the runtime.
      Why? Can i stop it? Can i clear the memory usage without a programm restart.

      The Background:
      I have a big application and the memory usage is growing up to 230.000 k in the TaskManager - Win XP SP3
      then the application hang on. In the developement mode i see that i have an
      Error: Out of memory usage

      System:
      - IntelCor2Duo 1,8 Ghz
      - 2 Ghz RAM

      The problem is. The air app is opened and the memory usage is growing up again and again but i dont do anything in the application. Is it possible to clear the memory cache at the runtime (like a programm restart)

      Sorry for my english. I´m german.

      best regards.
      BjT
        • 1. Re: memory usage - question to handle big applications
          tzeng Adobe Employee
          You need to tell people what you do in your program to give people a hint to help you.

          -ted
          • 2. Re: memory usage - question to handle big applications
            bjt1988 Level 1
            okay.

            in the application i work with html and javascript. I use a framework - extjs. In the application i use the sandbox and the non-sandbox mode.

            a simple example. in the main page i load the extjs sources and create a login mask. if the application is fully loaded i start the TaskManger from Windows and watch to the memory usage from the programm in the process list and it goes up and up. But i do nothing in the application. The application is fully loaded and i do nothing in the application but the memory usage goes up and up ---- to 230.000 K for example. Than i logged in and load an other simple page with some buttons and so on. The Application will be slower and slower after 230.000 K the application hangs complete and only a close and reopen help.

            I have a really simple question:
            Does Adobe Air automatically grow up the memory usage at the runtime again and again or is it a problem in my programming way.

            I hope someone understand my problem.

            Thanks.
            BjT
            • 3. Re: memory usage - question to handle big applications
              bjt1988 Level 1
              very interesting.
              if i minimize the application to the system bar the memory usage is going down to a normal status. than i open the application again from the system bar and after a few seconds the memory usage is going again up and up
              • 4. Re: memory usage - question to handle big applications
                bjt1988 Level 1
                so now i have one solution. If anybody know something about the extjs framework it would be helpfull for you

                Don´t use the attribute "monitorValid = true"
                This option will grow up the memroy usage of the air app every time without an interaction in the application.

                Another point is. In my application with the hang problem i have a tabpanel where i can dynamically add tabs, more and more. Not the memory is the problem. The Problem is if you open and close tabs to fast and to much (over 15 at one time) the application will be slower and slower and than hang on.
                The biggest problem is: I close a Tab. But the air application does not release some memory. No, the close event grow up the memory. Thats a big problem.
                I found an very interesting page with a nice .ppt presantation how the flash memory management work.
                http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html

                It is possible to release some memory. Unused variable have set to null and an air.System.gc(); will remove the trash. trash = a variable who is null.

                I actually test this thing to release some memory if a tab is closed.
                If i test it successfully i will post it.

                Does anybody has another idea to this problem.

                PS: Is the way with air.System.gc(); the right way to remove some trash variables and is it right to set unused vars to null to get them free?

                Sorry for my english. I´m german.

                best regards.
                BjT