Search code examples
javagwtsplitgwt-compiler

GWT runAsync - generated fragments code dependencies


i'm trying to modify my app's loading performance by using runAsync when initializing different subsystems and I have a few questions:

  1. when the code called in callback's onSuccess method is split in another download fragment, will all the code from the called classes, subclasses, methods (those of the main class, and those of the classes used by them) etc be split as well, and not included in the initial download ?

  2. when instantiating a class outside the callback's onSuccess, will the whole code of that class be included in the initial download (metods, members, other subclasses)? so if I call methods from that class in the callback's onSuccess will the code be included in a separate download (ie. the code from the class's constructor will be in the initial download and those from its called methods will be in a separate download ?)

If the answer is in another post, please share :)


Solution

  • Read this if you have any query then comment it.

    https://developers.google.com/web-toolkit/doc/latest/DevGuideCodeSplitting

    http://www.javabeat.net/2011/11/code-splitting-in-gwt/