Search code examples
gwtgxt

GWT: does code-splitting have any effect when in development mode


I've read in so many places that code-splitting can significantly speed up the initial loading time of a GWT application. However, before we do the splitting, we would like to know whether the deferred download of codes also work when in development mode?

Currently our most painful point is that in development mode with debug mode, when we refresh the browser (to refresh the changes in client code) it will take 3.7 years for the app to reload. In production mode the application will load in a matter of seconds.


Solution

  • Code splitting has absolutely no effect in Dev Mode, because your application is not compiled to JavaScript.

    When GWT.isScript() is false (Dev Mode) RunAsyncCallback.onSuccess() method is run immediately. It is apparent if you inspect the source code of the GWT.runAsync() method.

    EDIT: just a small thing to add as well: do NOT use Chrome with DevMode. Chrome still has an outstanding bug (the link escapes me right now) that makes the DevMode Plugin for Chrome run really slowly. Use Firefox, it is the fastest with the Dev Mode plugin.