Q:

gwt code splitting with an existing Project

I have a project with a mobile and Desktop view, with over 100 classes, my question is now : What the best way is to splitt up this code ?
looking in the complier report which class is over 10kB and call it via a runAsync?

A:

Typically, you split your application into logical pieces based on a user behavior, not a code structure. For example, if all users enter View A, and then only some of them go to View B and very rarely users go to View C (e.g. "Settings" view), then View B is a good candidate and View C is an obvious candidate for splitting.
When you split your code, there are two key fragments in addition to each split point: the initial fragment and the leftover fragment. The compiler decides which class goes where based on your split points. If a class is called from many different places, it will end up either in the initial fragment or the leftover fragment, which means it will always be loaded when a user accesses your app. Only classes which are specific to a split fragment will be loaded when needed.
The best way forward is to create a split point in a place that looks the most promising, compile the app, and then examine the compile report to see how your code size broke down between the initial fragment, the split fragment, and the leftover fragment. It will give you a good idea if splitting is worth it for your app.

