PDA

View Full Version : Application Size



EvilTed
9 Sep 2008, 9:38 AM
Does anyone have any information on how to optimize application size.
We've basically got the navigation and the framework in place and the application size is already 1.5MB.
Is this normal?

I'm using IntelliJ 7.04 to build everything.
Are there settings I can set to tweak everything?

Will application size impact performance as we proceed (aside from the long load times that can be somewhat negated by the MVC architecture).

Thoughts?

Thanks

ET

jpnet
9 Sep 2008, 9:44 AM
You are referring to the size of the generated javascript file, right? Wow, that seems abnormally large... especially considering the GWT compiler's pruning feature. I haven't written a very large app yet, so I could be wrong.... but that still seems way too big.

I would like to hear what others have to say.

-JP

EvilTed
9 Sep 2008, 10:01 AM
I haven't written a very large app either :)

What size are the sample applications "Mail" and "Explorer" ?

EvilTed
9 Sep 2008, 2:17 PM
Digging into this it seems that 950KB was images.

Darrel,
Do you think you can add support for raw images in controls etc?
This way we can use GWTs ImageBundle and load the images in one go and then set them to the control.

I'm still curious about reducing the size of things.

Cheers

ET

posta07
10 Sep 2008, 2:28 PM
This way we can use GWTs ImageBundle and load the images in one go

Isn't this what sprites do?

Is there a difference between the performance/functionality of sprites v ImageBundle?

zaccret
11 Sep 2008, 12:09 AM
Sprites ?

gslender
11 Sep 2008, 12:33 AM
Sprites = css positioning within the image and is the same kinda thing to imagebundles...

http://www.websiteoptimization.com/speed/tweak/css-sprites/

zaccret
11 Sep 2008, 2:08 AM
Ok. Thanks for the link. I knew this technique but didn't know it was called "sprites".

Anyway, as far as I know, GWT ImageBundles would be really simpler to use than sprites. Using sprites imply a lot of CSS code, which is not what we expect with Ext GWT.

EvilTed
24 Sep 2008, 10:59 PM
bumping back to the top:

Do we have any figures from other people about the size of the compiled application?

What percentage of that figure are images?

I'm trying to get an idea of what the average size is?

Thanks

ET

jpnet
25 Sep 2008, 6:49 AM
Mine is about 285 KB. It's a fairly simple application too. That seems rather large considering that it's a simple application. I also thought the GWT compiler's pruning feature would be a bit more aggressive.

On a side note, maybe this is related... but does it matter if I import classes like such:
com.somecompany.superwidgets.*; as opposed to
com.somecompany.superwidgets.specificwidget; ? Maybe that would have something to do with it?

Oh well, GWT/GXT seem to be working pretty well despite the large file size. I would be interested in reading other's opinions.

-JP

gslender
27 Sep 2008, 9:24 PM
Not sure exactly what you should use to judge app size, but my [md5].cache.html is approx 512K for a fairly complex app. Interesting point is that after it reach 450K it didn't really get much larger for a lot more complexity. I know the complexity will further double, but expecting the app size to remain fairly constant now. I'm guessing the GXT lib, once pulled in, won't cause the app to get much fatter as you add further features.

One thing that would be nice, is a way to show that the [md5].cache.html file is loading - some kind of indicator to show that its 10% / 50% / 100% etc.... whilst 500K should download in a second or 3 (depending on your broadband link speed) it does keep the user wondering for 2-3 seconds.

mraible
4 Feb 2009, 1:58 PM
Not sure exactly what you should use to judge app size, but my [md5].cache.html is approx 512K for a fairly complex app. Interesting point is that after it reach 450K it didn't really get much larger for a lot more complexity. I know the complexity will further double, but expecting the app size to remain fairly constant now. I'm guessing the GXT lib, once pulled in, won't cause the app to get much fatter as you add further features.

One thing that would be nice, is a way to show that the [md5].cache.html file is loading - some kind of indicator to show that its 10% / 50% / 100% etc.... whilst 500K should download in a second or 3 (depending on your broadband link speed) it does keep the user wondering for 2-3 seconds.

My [md5].cache.html file is 320K (with OBF, 1.9M with DETAILED). My app is only a few screens, so this seems quite large. Is this file generated with only the functions it needs, or does it include all of Ext JS?

Thanks,

Matt