File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes Improved Compiler Performance for GWT: Reduce permutations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Improved Compiler Performance for GWT: Reduce permutations" Watch "Improved Compiler Performance for GWT: Reduce permutations" New topic

Improved Compiler Performance for GWT: Reduce permutations

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

So, I'm compiling like crazy, and I keep seeing twenty permutations being compiled by the Google Web Toolkit compiler. Anyways, I started thinking, "How can I reduce the number of permutations?"

Apparently, there's a permutation for each language and browser that your app supports. So, if you've got four browsers and three languages, you get at least twelve permutations. I think GWT defaults to supporting four browsers or something.

Anyways, but specifying only the browser you are using during local testing, you can greatly reduce the number of permutations, and greatly speed up complication. It's just set-property entry in the gwt.xml file for your module. So, to use only ie, you can make the following entry (I had to use Internet Explorer as my Chrome Dev release keeps crashing):

<set-property name="user.agent" value="ie6"/>

Other options are ie6, gecko1_8, safari...I'm not sure the that user.agent name is for Chrome. Gecko1.8 is Firefox apparently.

This took me down to only two permutations, and improved compiler performance time greatly.

Feel free to add on any other hints for improving the GWT compile time. I'd love to hear them!

-Cameron McKenzie
Karina Guenther
Ranch Hand

Joined: Sep 16, 2005
Posts: 62
This helped me with my problem as well. I had about 7 modules each compiling 24 times taking 25 minutes. Added this statement cut the compile in half. I then realized I could use Eclipse to control which modules I was compiling based upon where I made my changes. Together this reduced my compiling times for testing down to a more manageable 2 minutes.
Rick Poleshuck

Joined: Aug 31, 2011
Posts: 1
You can use 2 agents by separating them with commas.
For example:
<set-property name="user.agent" value="ie6,gecko1_8"/>
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Just as an FYI, all valid values can be found at The history of the file shows which permutations got enabled or disabled when and why. For example, "opera" no longer exists, because that now uses Webkit, the same rendering engine as Safari.
I agree. Here's the link:
subject: Improved Compiler Performance for GWT: Reduce permutations
It's not a secret anymore!