permutation explosion

162 views
Skip to first unread message

mma

unread,
Oct 24, 2011, 9:54:10 AM10/24/11
to google-we...@googlegroups.com
The problem:
  • Compiling GWT code without <collapse-all-properties /> makes the size of the resources so big that it can't be uploaded to Google App Engine
  • It seems that the total size of the resource files is larger than 450 MB (App Engine allows resource size less than 150 MB)
  • Using <set-property name="user.agent" value="safari, ie8" /> still has size over 150 MB (~192 MB)
Any tips for supporting the major browsers without hitting this resource size limit?

Thanks for your help.

Thomas Broyer

unread,
Oct 24, 2011, 10:08:41 AM10/24/11
to google-we...@googlegroups.com
150MB is HUGE!

Are you trying to deploy symbolMaps files too? If you don't know what they're for, you can safely remove them (WEB-INF/deploy folder), and/or tell GWT to output them elsewhere (pass the -deploy option to DevMode and Compiler)

mma

unread,
Oct 24, 2011, 7:42:16 PM10/24/11
to google-we...@googlegroups.com
Hi Thomas.

Here is summary of the size of the war folder and its subdirectories after compiling without <collapse-all-properties/>: 

war/ 492 MB

war/'module-name'/ 137 MB
war/web-inf/ 352 MB

war/web-inf/deploy/ 313 MB
war/web-inf/lib/ 33 MB
war/web-inf/classes/ 8 MB

war/web-inf/deploy accounts for most of the space (313 out of 492 MB), but the remaining folders add up to 178 MB.

What am I doing wrong besides including the war/web-inf/deploy files?

Thomas Broyer

unread,
Oct 25, 2011, 6:20:58 AM10/25/11
to google-we...@googlegroups.com
What's the size distribution within war/'module-name'/ ? Do you use many resources (mainly DataResource, ImageResource)? Do you use 'public' resources (files in 'public' subfolders of your modules")?

mma

unread,
Oct 25, 2011, 6:30:22 AM10/25/11
to google-we...@googlegroups.com
Hi Thomas.

It seems that the deferredjs folder within the war/'module-name' folder takes up 88 MB. Is it normal?

The PNGs in war/'module-name' are a only a few with max size of 16 KB.

The war/'module-name' has more than 20 html files, each of one larger than 700 KB.

Thank you!


Thomas Broyer

unread,
Oct 25, 2011, 7:09:22 AM10/25/11
to google-we...@googlegroups.com
Have a look at your compile report then: http://code.google.com/webtoolkit/doc/latest/DevGuideCompileReport.html and possibly tweak your usage of GWT.runAsync (you probably use it too much).

(but really, 137MB still seems huge to me)

mma

unread,
Oct 25, 2011, 10:55:33 AM10/25/11
to google-we...@googlegroups.com
Thomas, thanks for the advice.

I've used <set-property name='locale' value='default' /> in order to reduce the number of permutations from ~50 to 5. I've learned that I had 50 permutations by looking at the compile report you mentioned.

This reduced the war folder size to 86 MB.

This will allow me to test with code for different user agents, while locale is still not an issue.

Thanks!

Thomas Broyer

unread,
Oct 25, 2011, 2:06:42 PM10/25/11
to google-we...@googlegroups.com


On Tuesday, October 25, 2011 4:55:33 PM UTC+2, mma wrote:
I've learned that I had 50 permutations by looking at the compile report you mentioned.

Should I understand that you don't look at what the compiler prints on the standard output ?! 

mma

unread,
Oct 25, 2011, 2:30:01 PM10/25/11
to google-we...@googlegroups.com
For some reason, eclipse is not outputing anything during the compilation. Maybe it's some option that's not set.

Thomas Broyer

unread,
Oct 25, 2011, 2:32:25 PM10/25/11
to google-we...@googlegroups.com
Is your "console" view open?

mma

unread,
Oct 25, 2011, 2:37:26 PM10/25/11
to google-we...@googlegroups.com
I see console messages when uploading to appengine ("creating temp folders", "uploading files", etc.), but not when compiling GWT.

mma

unread,
Oct 26, 2011, 6:48:49 AM10/26/11
to google-we...@googlegroups.com
Here is an excerpt of console output (when I upload to appengine):

------------ Deploying frontend ------------


Preparing to deploy:

Created staging directory at: '/var/folders/CC/CCXgSiQyGZChKamrrjcK2k+++TI/-Tmp-/appcfg7657467333929685094.tmp'

Scanning for jsp files.

Scanning files on local disk.

Scanned 250 files.

Scanned 500 files.

Scanned 750 files.

Scanned 1000 files.

Scanned 1250 files.

Initiating update.

Cloning 162 static files.

Cloned 100 files.

Cloning 1216 application files.

Cloned 100 files.

Cloned 200 files.

Cloned 300 files.

Cloned 400 files.

Cloned 500 files.

Cloned 600 files.

Cloned 700 files.

Cloned 800 files.

Cloned 900 files.

Cloned 1000 files.

Cloned 1100 files.

Cloned 1200 files.




Deploying:

Uploading 242 files.

Larry

unread,
Apr 12, 2012, 10:55:31 PM4/12/12
to google-we...@googlegroups.com
Hi Thomas,
       I have the same issue and solved by your advice. After my app deployed, I check the appcfg1464646291421890984.tmp folder.  The total size of this folder is 112M and the content   as following:
module1
module2
module3
module4
otherhtml
WEB-INF
images
index.html
favicon.ico
__static__
module1
module2
module3
module4
otherhtml
images
index.html
        favicon.ico

The __static__ contains all folders and files same as parent folder. Only WEB-INF not included in this folder. 
Is it normal or I miss something? If it's normal, it is about 50M. I worry my app will exceed 150M when I 
add more modules to my app.

Thank you



Thomas Broyer於 2011年10月24日星期一UTC+8下午10時08分41秒寫道:

Qian Qiao

unread,
Apr 20, 2012, 10:26:02 AM4/20/12
to google-we...@googlegroups.com
2012/4/13 Larry <kue...@gmail.com>:

Try this: use xs or xsiframe linker, dump the JS files onto Google
Storage or S3, and serve the JS from there.

-- Joe

Joseph Lust

unread,
Apr 20, 2012, 6:08:59 PM4/20/12
to google-we...@googlegroups.com
I misread this as Precambrian Explosion at first.


Sincerely,
Joseph

Michael Allan

unread,
Apr 21, 2012, 4:32:14 AM4/21/12
to google-we...@googlegroups.com
Joseph Lust said:
> I misread this as *Precambrian Explosion *at first.

In the Call for Action thread, the concern is a Permian Extinction.

Michael
Reply all
Reply to author
Forward
0 new messages