I am using ant to compile gwt but it takes long long time to compile. near 50sec.
How can I speed up compiling process.
ant task is
<target name="gwtc" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${src.dir}"/>
<path refid="compile.classpath"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<!--<arg value="-style"/>-->
<!--<arg value="DETAILED"/>-->
<arg value="com.typingApplication.TypingApplication"/>
<arg value="-war" />
<arg value="${build.dir}" />
</java>
</target>
Add the param
-localWorkers. This specifies that the permutations are done in parallel. Especially on a multicore machine this makes sense. The parameter for the argument is the number of parallel runs. I tested several combinations and found that4gave the best results(fastest, even while i tested it on a 6 core/12GB machine). So just try out what works best in your situation, also experiment with the memory value. for example try 512 instead of 256.A second option is
-draftCompile. This skips some compile optimizations, so it’s not an option you want to use for the production release. But in development it saves compilation time.Or buy a faster machine;-) processor speed matters in this case