What is the impact of *.cache.html size

38 views
Skip to first unread message

News Club

unread,
Nov 15, 2011, 6:41:30 PM11/15/11
to google-we...@googlegroups.com
Hi:
 
We have relatively a large GWT project. Our compiled code size (i.e *.cache.html) used to be 4.5 MB.
 
I have recently included a couple of gwt open source libraries. After that,
 
a) The compiler permutations gone from 5 to 59.
b) The compile time went from 3 mins to 18 mins.
c) The total size of *.cache.html files went up from 4.5 MB to 40MB.
 
I like the benefits of this open source library. But, I would like to know what is the impact of *.cache.html file size during runtime?
 
Thanks
 
Nara

Thomas Broyer

unread,
Nov 15, 2011, 7:51:31 PM11/15/11
to google-we...@googlegroups.com
If you don't use runAsync, then one browser will only ever download a single *.cache.html file.

(btw, jumping from 5 to 59 permutations just by "adding a couple third party libs" looks suspicious: what the hell are these third party libs doing to create that many permutations?!)

Thomas Klöber

unread,
Nov 16, 2011, 1:53:53 AM11/16/11
to google-we...@googlegroups.com
permutations are compile for each supported language and browser, ie for
each language and for each browser there is 1 .html file.
Did you change anything else apart from adding 3rd party stuff?

Check out the Code Splitting features described here:
http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideCodeSplitting.html.
That can help you to generate smaller .hmtl files if the above fails.

--
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 M�nchen
Registergericht: Amtsgericht M�nchen, HRB 88283
Gesch�ftsf�hrer: Albert Fuss

Palo G.

unread,
Nov 16, 2011, 8:31:50 AM11/16/11
to Google Web Toolkit
Hi,
this is one of reason why usage of open source libraries for GWT is
very painful. There is lots of code.

So some hints:
- use only parts of third code libraries that you really need
- did you compiled your project with argument -style OBF ? <- this
really helps
- use code split for forms that your users don't need in every time
use - settings forms
- and propably the most important think, compile your project with
compilation report and see where and what is source of your
troubles ... http://code.google.com/intl/cs/webtoolkit/doc/latest/DevGuideCompileReport.html

Goog luck, mate..maybe you can write libraries that you used?

jusio

unread,
Nov 16, 2011, 9:03:04 AM11/16/11
to Google Web Toolkit
The total size of all *.cache,html is not so important. What is
important is an average size of singli *.cache,html file, because it
is basically the amount of data users will have to download. In your
case it should be somewhere around 700kb. What it means, is that in
order for user to start using your app they have to wait until those
700kb is downloaded. You decide how bad is it for you=)

On Nov 16, 2:31 pm, "Palo G." <palo.gre...@gmail.com> wrote:
> Hi,
> this is one of reason why usage of open source libraries for GWT is
> very painful. There is lots of code.
>
> So some hints:
> - use only parts of third code libraries that you really need
> - did you compiled your project with argument -style OBF ? <- this
> really helps
> - use code split for forms that your users don't need in every time
> use - settings forms
> - and propably the most important think, compile your project with
> compilation report and see where and what is source of your
> troubles ...http://code.google.com/intl/cs/webtoolkit/doc/latest/DevGuideCompileR...

NR

unread,
Nov 16, 2011, 12:12:08 PM11/16/11
to Google Web Toolkit
Thank you all for the helpful answers. The library that is increasing
the permutation is gwt-cal. As pointed out by Thomas, it looks like it
is building a separate .cache.html for each language.

Thanks again.

Nara

Thomas Broyer

unread,
Nov 17, 2011, 7:21:48 AM11/17/11
to google-we...@googlegroups.com
A "good citizen" library should support many languages but not force you to use them (i.e. not <extend-property name="locale" .../>). GWT has supports for many languages re. number and date formatting, and yet by default you only have the "default" locale.
I'd suggest you file a bug on the gwt-cal project about their use of extend-property.
And as a workaround, use <set-property name="locale" value="list,of,locales,you,want,to,support" /> (e.g. <set-property name="locale", value="default"/> to go back to the default behavior)
Reply all
Reply to author
Forward
0 new messages