Widget compiling on ant takes long!

Hello All,

I am trying to use ant to build my project and have used the widget compiler in it. I have a couple of addons in my project. The compiler seems to take long like 5-6 mins. Why is it so? Can we reduce the time taken?

Most of the time is spent by the GWT-compiler on analyzing the sourcecode (it must look through all files to identify all dependencies) and compiling the code to all permutations - this is for all supported languages and all supported browsers. To reduce the compile-time during development, you can tell the compiler to create only one permutation: Your favorite language in your favorite browser. For achieving this, you need to edit your widgetset-definition; add the following line to only compile for Firefox:

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

More tricks might be found
here
.

While this does not help when you want to do a full build from scratch, note also that the widgetset only needs to be recompiled when you change the set of add-ons used in your project (or client side code directly in the project if you have any). You could e.g. have separate Ant targets for a complete build and a development time build that does not remove and rebuild the widgetset.