Tuesday, March 17, 2009

GWT compiler optimizations

http://css.dzone.com/news/understanding-gwt-compiler

If you want to change the style of the javascript that is generated you can use the following argument.
-style The script output style: OBF[uscated], PRETTY, or DETAILED(defaults to OBF)

Another nice argument to know is this one that will not fully optimize the generated code, and will allow for faster compile times when compiling for Dev reasons:
-XdisableAggressiveOptimization

The last thing that can speed up compile times, is to narrow the number of user agents (browsers) that you want the generated code to work with. You have to edit the UserAgent.gwt.xml file in the gwt-user.jar which can be a pain, but is well worth the trouble if you are compiling only to test a one browser.