Speedup widget set compilation

Just a small note:

When using a multicore/cpu maschine to compile the widgetset you can speed it up
with this parameter in the build-widget-set.xml (For netbeans):

In the compiler definition:

	<java classname="com.google.gwt.dev.Compiler"
		  failonerror="yes" fork="yes" maxmemory="256m">

[color=#0707cf]

[/color]

		<arg value="-war" />
		<arg value="${client-side-destination}" />
		<arg value="${widgetset}" />

The localWorkers can be set to the number of cores/cpus and then the compilation is greatly boosted
Of course a similar thing should be possible with eclipse since it’s a functionality of the gwt compiler.

André

Awesome. I mostly use the Eclipse plugin to compile widgetsets. I started looking around for how this is configured and found the “Compiler thread” setting under project properties → Vaadin, which is most likely the same thing. There where the options of core about (1-8) and a default blank settings. I compared the blank default with 8 and timed them, and the time was more or less the same. Seems that the default of the eclipse plugin is that it should use as many cores as there are for compilation, which is good.

Another way to speed up the compilation while in development is to just compile the widgetset for the browser that you are testing with. You can do that by specifing the user.agent under your widgetset’s xml file, as specified in the
Book of Vaadin: 10.5. Defining a widget set
.

Yes, the Eclipse plugin uses the number of available CPUs/cores as the default level of parallelism.

To add my 2c widgetset compilation tips here… the ones I always use:

  • If you only use a single browser while developing, add ‘’ parameter to the .gwt.xml.
    List of browsers is here
    .
  • Use “draft compile” option. This is the ‘-draftCompile’ GWT compiler option, but in Eclipse you can find it in Vaadin options as ‘JavaScript Style’.

More information
http://vaadin.com/book/-/page/gwt.widgetset.html
and
http://vaadin.com/book/-/page/gwt.development.html
.