View Full Version : How to reduce runtime size for my application
illangoo
06-17-2009, 07:13 AM
Hi All,
My application is like template creation using drag and drop images and text with some effects.But my problem is the application run time initial size is coming around 221MB but its slowly increasing when i keep on working on it ,I don't know how to control it .Give me some clue.
Thanks,
wvxvw
06-17-2009, 08:27 AM
Look for the references to unused bitmapdata and loaded files, if you have any. besides, there's a profiler - try using it, and report your findings ;)
Peter Cowling
06-17-2009, 08:29 PM
A few of the many options:
Use modules if they make sense
Externalise the flex framework - there are pros and cons to this
If you embed fonts, get specific with the unicode range
Watch how many child components you are adding - if you do most work in mxml, there may well be some fat there
Take a look at the types of comonents you use and consider alternates
Optimise any embeded assets
charlesshoults
06-18-2009, 09:45 PM
When I started working on my project, the entire thing was a single swf file. The file size started getting up to about the 1MB size and it was taking a long time to compile. I then started working with modules, with my current count up to 16. While the secondary modules were very small, normally around 40kb, but the primary swf file didn't shrink at all. I then set it up for RSLs and things improved considerably. My main swf is 672kb and the others are still fairly small, ranging from 52kb to 636kb. Overall, I'm using about 5MB across all swf files. I realize that's much smaller than your 221MB but all of my assets take up about 1.6GB and my database is another 162MB.
aktell
06-19-2009, 05:02 AM
Hi there,
Your main .swf file is too large! And it does not matter how many smaller .swf’s you got even if there are 100 as long you can organize them properly it works.
The other thing is but only you know, are you loading, preloading orderly and why is your main .swf set up that large? The main file should only be the carrier for your Intro module and modules and pre-loading for the next steps in line!
The main file is the one which should be as small as. My own are usually 120kb but never ever larger than 175kb because there is nothing in it except the code for the modules to init, preload maybe the menu and a ‘ViewStack’ for the ‘ModuleLoader’, and some file module/Image preloading to apply the hourglass while this all is done.
Load anything in the main app. with
http://www.yourname.com.au/pathway/index.html and avoid embedding anything or linking through pathway/assets/pathway/modulename-Imagename…..etc.
To use the http://……… makes sure that your application start up is responsive and nearly instantly and while the visitor is orientating himself the loading gets done in the background.
As well it does not matter that you have Gig’s across all .swf’s in your set up ONLY the one module (maybe sub modules) in use are important at the time it gets addressed.
regards aktell
Peter Cowling
06-19-2009, 09:32 AM
My reading of the 221mb quoted is that this figure actually represents the memory usage of the browser when the application is first loaded. If not... well that is the largest flex application I have seen.
A couple of further points along these lines:
Garbage collection is could be better for flex, and problems there will affect your resource usage. Learn about the events lifecycle, including effective use of event listeners, and you can make a dent in any problems there.
Pagination helps limit the number of data objects you need to use at any one time. That is important.
Object pooling for reuse is also a big help if data object volumes is a problem.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.