6 Replies Latest reply on Nov 25, 2010 11:13 PM by Flex harUI

    Memory Usage

    JPatlovany

      I am looking to build an application with approximately 150 screens, and I was looking at using Adobe Flash Builder 4 and Adobe AIR.  Any idea how I can determine my user's system requirements?  Such as harddrive space, memory, processor needs, etc?  I've started playing with it and made an app with 5 screens; any way I can look at that and estimate where that app will eventually be if I keep going with it?

        • 1. Re: Memory Usage
          Klajdi_Karanxha

          That Depends on the complexity of your application.

          Is it going to be modular? Is it going to use a lot of I/O, like Camera, network, Printer etc...

          Is it going to use a lot of services, Remote Services etc....

          Once you have teh specifics of your own application thatn you can determine user's requirements.

           

          Regards,

          Klajdi

          • 2. Re: Memory Usage
            JPatlovany Level 1

            Well, it will probably be very complex.  I plann on making it modular.  And, yes, it will have several devices and remote services.  I tried using the profilier and right now it says I have peak memory usage of 7183K, but that is only screens, no devices or services.  I guess my issue is that management is telling me they've heard Flex/Flash uses way too memory, so they are kind of dismissing this as a solution, but I need data to prove otherwise.

            • 3. Re: Memory Usage
              Klajdi_Karanxha Level 1

              Flex isn't the best solution if you're building a multi-level and complex application that is using several resources.In fact, it will be slow as the overhead is heavy in Flex. Loading modules inside a Flex application is a heavy process and even though you can unload them (using unloadAndStop()) they still will not be completely removed from the memory, you can test that and see that as many modules as you open(doesn't matter if it is the same one that you're loading and unloading) will add up an amount to your memory allocated to the application, at least that is the result of tsome test I did before a few days witha multi-modular application. From the research i've conducted I found that the modules are not completely unloaded from the memory and hopefully this will be corrected on Flash builder 4.

               

              Sincerely,

              Klajdi

              • 4. Re: Memory Usage
                Flex harUI Adobe Employee

                What would be the alternative?  HTML?

                 

                Modules do unload if you follow the recommended practices.  The latest list

                of things to look for is on my blog.

                 

                HTML can be more memory efficient because it every time to go to a new URL,

                all the stuff created in the old URL is destroyed.  Even if you use

                document.write to transform the page on the fly, the old objects get

                destroyed.

                 

                Flex does not destroy UI widgets by default, but there are ways to free up

                those widgets.  Like any other large complex application, custom

                optimization will likely be required to achieve acceptable performance and

                memory usage.  And then you will be able to enjoy the benefits of Flex by

                creating a richer and more powerful user experience with fewer

                browser-specific issues to tackle.

                 

                Some folks who have replaced HTML-based data collection processes like

                shopping carts with Flex-based versions have reported fewer cases of

                "abandonment" and faster times from start to finish.  It might take more

                memory than an HTML-based version, but most folks have machines that can

                handle it.

                 

                 

                --

                Alex Harui

                Flex SDK Team

                Adobe System, Inc.

                http://blogs.adobe.com/aharui

                • 5. Re: Memory Usage
                  Klajdi_Karanxha Level 1

                  Hello,

                  Could you please redirect me to a source when I can learn more about module loading and unloading.

                  Also, swf object loading and unloading.

                  I am managin a very complex platform built with Flex 3 and I am having issues with swf object unloading from the main flex application.

                  That would be very helpful. Just some best practices to keep in mind while developing.

                   

                  SIncerely,

                  Klajdi

                  • 6. Re: Memory Usage
                    Flex harUI Adobe Employee

                    Search for Memory on my blog.

                    --

                    Alex Harui

                    Flex SDK Team

                    Adobe System, Inc.

                    http://blogs.adobe.com/aharui