2 ms·
While I agree that the code-splitting in GWT 2.0 might help you, you may also want to see where the slowness in loading is really coming from. For example, is
by pohl 17y ago
While I agree that the code-splitting in GWT 2.0 might help you, you may also want to see where the slowness in loading is really coming from.
For example, is it really the size of the app that makes it slow to load, or is part of the problem that you're not using lazy-initialization judiciously? If all of the possible widgets are eagerly created, that could make it appear to be loading slowly.
Another possibility is the number of HTTP round-trips that have to be made. Do you have a lot of images? If so, are you using the ImageBundle facility? (It's awesome: the compiler automatically makes a CSS sprite image and generates the code to slice the images out automatically.) If not, you should.
Another possibility is whether you are using any 3rd-party GWT widget toolkits. Some of them are wrappers for other, more traditional javascript libraries, and those will really bloat the amount of code the browser needs to download! Stick to a widget kit that is actually written in java, or create your own custom widgets as needed.
Another possibility is that I once accidentally left my compiler configured to emit verbose javascript. Make sure you're emitting tight, obfuscated javascript.
Finally, make sure that the HTTP daemon that serves the files are configured to gzip the javascript for those browsers that are capable.