I finally tracked this down, it appears Android client bundles are not
being optimized out of the Iphone build, for example. This code:
public MGWTThemeBaseThemeStandardImpl() {
if (MGWT.getOsDetection().isAndroidPhone()) {
bundle = GWT.create(MGWTClientBundleBaseThemeAndroid.class);
}
if (MGWT.getOsDetection().isAndroidTablet()) {
bundle = GWT.create(MGWTClientBundleBaseThemeAndroidTablet.class);
}
if (MGWT.getOsDetection().isIPhone()) {
if (MGWT.getOsDetection().isRetina()) {
bundle = GWT.create(MGWTClientBundleBaseThemeRetina.class);
} else {
bundle = GWT.create(MGWTClientBundleBaseThemeIPhone.class);
}
}
if (MGWT.getOsDetection().isIPad()) {
if (MGWT.getOsDetection().isIPadRetina()) {
bundle = GWT.create(MGWTClientBundleBaseThemeIPadRetina.class);
} else {
bundle = GWT.create(MGWTClientBundleBaseThemeIPad.class);
}
}
...
}
on GWT 2.5 is optimized into:
function MGWTThemeBaseThemeStandardImpl_0(){
($clinit_MGWT() , false) && (this.bundle = new
MGWTClientBundleBaseThemeAndroid_iphone_safari_default_InlineClientBundleGenerator_0);
this.bundle = new
MGWTClientBundleBaseThemeIPhone_iphone_safari_default_InlineClientBundleGenerator_0;
}
This is essentially if(false) { android bundle}
I'm a little perplexed since the compiler has never really optimized
stuff like (clinit(), boolean) && blah, since it would need to hoist
the clinit() out of there which it doesn't do yet. I probably won't be
able to fix this for 2.5, but one workaround is to inline the
GWT.create(OsDetection) into the bundle theme and avoid calling MGWT
(which has a non-empty clinit)
> --
>
http://groups.google.com/group/Google-Web-Toolkit-Contributors