Wednesday, November 23, 2016

Re: GWT Code Splitting: The GWT Stuff and My Core Java Classes

Am Montag, 21. November 2016 23:07:57 UTC+1 schrieb Jens:

Can someone clarify?

Each GWT module that has an EntryPoint defined will end up being a GWT application. Each GWT application will contain the code of the GWT SDK that you are using in your app, e.g. a GWT Button, Label, LayoutPanels, etc. So yes if you have 10 small, independent GWT applications (= 10 entry points) and you sum up their final JS size you will end up with a larger total download compared to a single GWT application (= 1 entry point) containing the modules.

So people generally end up using a single GWT application (entry point) and if their app becomes too large they use code splitting so that the app is downloaded in smaller chunks on demand. However some people are also fine with having 10 GWT applications. Server side GZ compression, client side caching and the fact that each of the 10 GWT applications can also use code splitting makes the overhead of duplicated GWT SDK code downloads not that important. With 10 applications you also get benefits like updating them independently from each other.

So again: No you can not have a GWT.js library shared across your GWT modules. You either have to create a single GWT application or multiple GWT applications. A single GWT application will always be smaller than the same application split up into 10 smaller GWT applications because of GWT SDK code duplications. Choose whatever fits best for your use case.

Thank you for your clarification. Now the picture is much clearer to me!

The module system - with code duplication - is not a option for me since even with gzip I will bloat my cellphones traffic volumes beside of the evil wait times in bad coverage areas.
Even if I do not understand why such redundancy in modules is implemented by the JSInterop team, I understand that the split-points may help me.

There - hopefully my last question:
If I define following split-points:
  • bootstrap
    contains only some NOOP-code (e.g. a dummy trace to console)
  • calculation
    my calculation classes
  • view
    my view classes

Afaik from documentation, this would create the splitting I was asking for. Since with the first bootstrap-splitpoint I will also get the GWT-API code generated, and the other splitpoints shall only have the generated JS code of the wished classes. Or have I some knots in my thoughts?

If my assumption is right. is there a way to control the filenaming of the generated split-points? I could not find anything in the docs about it.

If there is no common way to control the filenaming, where in the JSInterop api should I take a look for it, to maybe intercept or modify the process of generation?

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment