Comment by cromwellian: I'm not a GWT team member, but I'll comment. It's not just pruning unused methods. It also affects obfuscation and a number of other things that make 'separate compilation/linkage' a difficult prospect.
In order for N different separately compiled programs to be linked at runtime, they'd all have to agree upfront on what the names of every publicly available class, method, and field were in the output ahead of time. This would have the effect of lengthening the names of most of the identifiers, further ballooning code. Then there's inlining and type-tightening. Currently, the compiler is able to detect when a method is not polymorphic (no overrides), and turn it into a static method. Moreover, in many cases, it can inline this method. Compile time linkage would prevent this, and the compiler would be forced to conclude that any non-final method can potentially be overriden, disabling inlining and prototype-chain reduction effects. There are lots of other problems to. You're essentially asking GWT to run in "Java to Javascript translator mode" rather than "Java to Javascript compilation" mode, akin to the way hand coded Javascript apps are architected. For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---