1 Reply Latest reply on Jul 18, 2011 7:36 PM by LowInternalMemory

    Flex 4.5 - Mobile Device Apps - Memory Issues

    satish@netx.net

      Hi All,

       

       

      How to ensure or check that the Apps written in Flex 4.5 for Mobile Devices does not cross the Memory Limit posed by the devices.

       

      I developed a App and I ran it on My Mac Laptop  , I checked the Memory Usage of the App , It showed the Real Memory usage as 80 MB .

       

      Obviously now people will say i have written un optimized code , That lead to memory leaks.

       

      So , I have another test for you guys , I created a sample Hello World Flex Mobile Project , Which just prints "Hello World" . Now , I checked the Memory usage of this App , It is taking 30 MB .

       

       

      My question is , What is the max limit a Flex Mobile App can consume and How to check them when we are developing them in our computers.

       

       

       

      Thanks,

      Satish

        • 1. Re: Flex 4.5 - Mobile Device Apps - Memory Issues
          LowInternalMemory

          Hi,

           

          You know what, thats a bloody good question, if a little too generalised.

           

          And, don't worry about your app reaching 80mb and people saying you right bad code, but ask yourself does adobe, or put it this way, does flash try to be something that it is not, or do the problems reside elsewhere (Google Android) or is it a combination of 2 and 3, yup i think so too,

           

          My experience with *Android* and Flex 4.5 so far (One of your 3 "Apps").

           

          My test app btw is cruising at a cool 100MB+ or mach 10 as i would prefer to describe which is just insane as far as my original design brief goes...goes being the operative word.

           

          ..All  i have in my app is a stagewebview component which loads a html page that contains a swf, the  swf being loaded is very heavy on bitmaps hence its high load on memory (loading swfs into swfs via whatever method, hmmm lets not even go there, lets just say an iframe is the only safe way if your programming skills are less than fluid expert).

           

          And, i realise that i must take responsibility really, for pushing things too hard, i understand mobile devices are different from desktop its just the guy from adobe had such good manners and said this was gonna change my life and the box was shiny and......or was it the google guy.....they both looked very similar, ok the adobe guy was better looking...

           

           

          Android is the key word here, because the 'App' that you refer to will be fine on iOS becos iOS creator actually had the power of mind to build an operating system that didn't leave you with a pityful amount of internal memory (ROM) to use for apps, this is the memory within the ROM which is reserved for applications (nothing to do with the sd card, and the sd card will not help you here much...sure the user can app2sd, sure the developer can deploy to the sd card but the allocation of rom to apps is OS based (as i understand it) and the amount of ROM is OEM based, and maybe the guys and gals from the OEM played with the OS, and maybe the guys and gals at the OS decided to upgrade the OS and in a day change your life......stay calm [reaching for stress pill, chokes on water].. SO STEVE JOBS WAS RIGHT JUST NOT ABOUT ADOBE.

           

          Now multiply these variables across all relevant mobile device manufacturers using android and things can get ugly.

           

          Today i find out i-OS developer well he got GIGOOOOBYTES, hes walking around slapping himself on the back just for breathing...

           

          Android developer (using HTC Desire Gingerbread 2.3) he got 119.99MB

           

          Let me just repeat that...

           

          119.99MB

           

          Oh, let me just reach for my zx spectrum.

           

          Read these explainations if you have not already,

           

          Shaun McCran Blog:


          http://www.mccran.co.uk/index.cfm/2011/1/14/How-Android-application-memory-works

           

          http://www.mccran.co.uk/index.cfm/2011/2/8/Adobe-Flash--AIR-large-memory-footprints-on-And roid-platforms

           

          On my HTC Desire HD when i first started testing how the swf (loaded through webstageview) would behave i was getting these weird behaviours, like the swf would display for 2 seconds then cut out and show a play icon, something i now understand is an out of memory (OOM) catch, read the flash player release notes for android 10.3 and you will find.

           

          About 119.99MB, i can confirm that for my HTC Desire HD also.

           

          Using this very useful tool http://www.quasimondo.com/examples/memoryhog.html i can take my HTC up to 120MB then it 'breaks', displays the play icon.

           

          I hear a whisper that different devices will vary, some a bit more rom allocation, some a bit less, My HTC Desire HD is no second rate phone device, and the guy from adobe well he could have warned me better beforehand about certain important development considerations but the buck, the buck stops with you on this one Google...and i'm very dissaapointed with it...Android has yet to mature you will eventually come good.

           

          So Adobe, pls make your renderer more efficient for now not 3 point something. If you can't do that please show us how to get around these problems, and please no smart arse comments from the tech guy or the fanboys.

           

          Hope this post helps you and others on your adventures. For me it did not becos unlike Shaun i can't afford to ditch flash, and unlike steve i do care about flash and the technologies i use to publish my art. But thats the problem i never get to really do it the way i want to. Unity3d is quite complex and gui building on Flex 4.5 is a complete piece of cake. I need to earn money for my family, i have no job. I rely on you guys to tell me the truth. I know you need to hype this stuff to create the buzz but this xerox style sales process will leave you short in the long run because this is not the fisrt time i've been dissappointed. A truly inspirational sales process is an honest one. Take it from someone who knows. Peace.