English version
How to speed up GWT compiler, the main idea is to reduce GWT permutations.
To manage the permutations, I build my own version of GWT 1.5 named GWT 1.5 r2030-olivier.
I am using 1.5 M1:
- svn co http://google-web-toolkit.googlecode.com/svn/trunk -r2030
- Edit I18N.gwt.xml to remove default locale and force "fr_FR" as "default" locale
Index: trunk/user/src/com/google/gwt/i18n/I18N.gwt.xml
===================================================================
--- trunk/user/src/com/google/gwt/i18n/I18N.gwt.xml (revision 2030)
+++ trunk/user/src/com/google/gwt/i18n/I18N.gwt.xml (working copy)
@@ -18,7 +18,7 @@
<!-- Browser-sensitive code should use the 'locale' client property. -->
<!-- 'default' is always defined. -->
- <define-property name="locale" values="default" />
+ <define-property name="locale" values="fr_FR" />
<property-provider name="locale">
<![CDATA[
- Edit UserAgent.gwt.xml and, in my case, remove unused some browsers : safari, opera, gecko (old firefox/mozilla)
Index: trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml
===================================================================
--- trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml (revision 2030)
+++ trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml (working copy)
@@ -19,7 +19,7 @@
<module>
<!-- Browser-sensitive code should use the 'user.agent' property -->
- <define-property name="user.agent" values="ie6,gecko,gecko1_8,safari,opera"/>
+ <define-property name="user.agent" values="ie6,gecko1_8"/>
<property-provider name="user.agent"><![CDATA[
var ua = navigator.userAgent.toLowerCase();
@@ -27,11 +27,7 @@
return (parseInt(result[1]) * 1000) + parseInt(result[2]);
};
- if (ua.indexOf("opera") != -1) {
- return "opera";
- } else if (ua.indexOf("webkit") != -1) {
- return "safari";
- } else if (ua.indexOf("msie") != -1) {
+ if (ua.indexOf("msie") != -1) {
var result = /msie ([0-9]+).([0-9]+)/.exec(ua);
if (result && result.length == 3) {
if (makeVersion(result) >= 6000) {
@@ -44,7 +40,6 @@
if (makeVersion(result) >= 1008)
return "gecko1_8";
}
- return "gecko";
}
return "unknown";
]]></property-provider>
With my own build, GWT compiler speeds up my project compilation :
- 12mn with GWT 1.5 r2030
- 4mn with GWT 1.5 r2030-olivier
- 1m15s with GWT 1.5 r2030-olivier + no additional locale
- 1mn with GWT 1.5 r2030-olivier + no locale + gecko1_8
This is an amazing gain : 12mn to 1mn



