help interpreting compiler report for code splitting

10 views
Skip to first unread message

sunn...@gmail.com

unread,
Nov 15, 2010, 8:38:25 PM11/15/10
to Google Web Toolkit
Hi all,

I've gone through the pages for code splitting, but I'm having trouble
interpreting the compiler report.

In my MVP application, I've put a split point in the application where
my application controller is instantiated (after successful login).

The results I get are:
Full code size: 427481 Bytes
Initial download size: 230909 Bytes
Left over code: 274 Bytes

1) That seems like a good result to me?

2) Does the lack of left over code indicate that the single split
point I've put in has almost very nicely divided the application into
pre and post login sections of code?

3) Beneath this, my split point is listed, along with a size - is this
size the amount of data that will be loaded once the split point is
reached?

4) After login, the main page of my application is set of tabs (where
this tabset is instantiated is where the first split point is). If I
have a split point at the load of each tab, can I expect the split
points to break up the size of the first split point?

5) From what I can see, the Initial download size comes from java.util
and SmartGWT - is there very little I can do here?

thanks for looking :)

sunn...@gmail.com

unread,
Nov 15, 2010, 8:38:25 PM11/15/10
to Google Web Toolkit

David Chandler

unread,
Nov 18, 2010, 4:31:25 PM11/18/10
to google-we...@googlegroups.com
> 2) Does the lack of left over code indicate that the single split
> point I've put in has almost very nicely divided the application into
> pre and post login sections of code?

It means there's very little code in common pre- and post-split.

> 3) Beneath this, my split point is listed, along with a size - is this
> size the amount of data that will be loaded once the split point is
> reached?

It will be loaded once the first split point is reached. Since you
have only one split point, you might want to specify that the leftover
code be loaded earlier (see
http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html#sequence)

> 4) After login, the main page of my application is set of tabs (where
> this tabset is instantiated is where the first split point is). If I
> have a split point at the load of each tab, can I expect the split
> points to break up the size of the first split point?

yes

> 5) From what I can see, the Initial download size comes from java.util
> and SmartGWT - is there very little I can do here?

The GWT compiler already only compiles JS that's reachable from your
program, but you can sometimes find ways to use more common code:
i.e., if you're doing something with java.util in one class, do it
that way consistently everywhere in all classes so you get the max
benefit of the downloaded java.util bytes.

> thanks for looking :)

You're welcome. HTH,
/dmc

--
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.com/

Reply all
Reply to author
Forward
0 new messages