diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-07-22 19:02:21 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-07-25 07:56:13 +0000 |
commit | be2a71110a75bc83a7281c11b60285079e8cbffa (patch) | |
tree | c134d9f5e9c3edd1612949244d5db3a6e8757705 /build/ide.xml | |
parent | 81645ab3566b34d8826f6b0e89938f00c83c9f4f (diff) | |
download | vaadin-framework-be2a71110a75bc83a7281c11b60285079e8cbffa.tar.gz vaadin-framework-be2a71110a75bc83a7281c11b60285079e8cbffa.zip |
Parallelize ide.xml (#14276)
With this patch, the theme-and-default-widgetset target finishes in 50
seconds, whereas it takes about 80 seconds without the patch. This
happens at the cost of peak memory usage rising from ~750mb to ~850mb.
Change-Id: I969e9b3b01907e24bb8d411884d060ca1b539bde
Diffstat (limited to 'build/ide.xml')
-rwxr-xr-x | build/ide.xml | 128 |
1 files changed, 72 insertions, 56 deletions
diff --git a/build/ide.xml b/build/ide.xml index 0775a67505..fa8b85ee23 100755 --- a/build/ide.xml +++ b/build/ide.xml @@ -4,61 +4,77 @@ <property name="work.dir" location="work" /> <property file="build.properties" /> - <ivy:resolve log="download-only" file="client-compiler/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="client-compiler.deps" conf="ide" /> - <ivy:resolve log="download-only" file="server/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="server.deps" conf="ide" /> - <ivy:resolve log="download-only" file="client/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="client.deps" conf="ide" /> - <ivy:resolve log="download-only" file="shared/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="shared.deps" conf="ide" /> - <ivy:resolve log="download-only" file="uitest/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="uitest.deps" conf="ide" /> - <ivy:resolve log="download-only" file="buildhelpers/ivy.xml" /> - <ivy:cachepath pathid="buildhelpers.deps" /> - <ivy:resolve log="download-only" file="gwt/ivy.xml" conf="ide" /> - <ivy:cachepath pathid="gwt.deps" conf="ide" /> - - <path id="classpath"> - <path location="bin" /> - <path location="build/classes" /> - <path refid="client-compiler.deps" /> - <path refid="server.deps" /> - <path refid="shared.deps" /> - <path refid="uitest.deps" /> - <path refid="client.deps" /> - <path refid="buildhelpers.deps" /> - <path refid="gwt.deps" /> - <path location="server/src" /> - <path location="shared/src" /> - <path location="uitest/src" /> - <path location="client/src" /> - </path> - - <target name="theme-and-default-widgetset" depends="default-widgetset, themes, vaadinPush.js"> + <!-- Setting this to 0 disables the parallel compilation --> + <property name="threadsPerProcessor" value="1" /> + + <target name="resolve" unless="resolve.done"> + <ivy:resolve log="download-only" file="client-compiler/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="client-compiler.deps" conf="ide" /> + <ivy:resolve log="download-only" file="server/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="server.deps" conf="ide" /> + <ivy:resolve log="download-only" file="client/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="client.deps" conf="ide" /> + <ivy:resolve log="download-only" file="shared/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="shared.deps" conf="ide" /> + <ivy:resolve log="download-only" file="uitest/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="uitest.deps" conf="ide" /> + <ivy:resolve log="download-only" file="buildhelpers/ivy.xml" /> + <ivy:cachepath pathid="buildhelpers.deps" /> + <ivy:resolve log="download-only" file="gwt/ivy.xml" conf="ide" /> + <ivy:cachepath pathid="gwt.deps" conf="ide" /> + + <path id="classpath"> + <path location="bin" /> + <path location="build/classes" /> + <path refid="client-compiler.deps" /> + <path refid="server.deps" /> + <path refid="shared.deps" /> + <path refid="uitest.deps" /> + <path refid="client.deps" /> + <path refid="buildhelpers.deps" /> + <path refid="gwt.deps" /> + <path location="server/src" /> + <path location="shared/src" /> + <path location="uitest/src" /> + <path location="client/src" /> + </path> + <property name="resolve.done" value="true" /> </target> - <target name="themes"> - <antcall target="compile-theme"> - <param name="theme" value="base" /> - </antcall> - <antcall target="compile-theme"> - <param name="theme" value="runo" /> - </antcall> - <antcall target="compile-theme"> - <param name="theme" value="reindeer" /> - </antcall> - <antcall target="compile-theme"> - <param name="theme" value="chameleon" /> - </antcall> - <antcall target="compile-theme"> - <param name="theme" value="liferay" /> - </antcall> - <antcall target="compile-theme"> - <param name="theme" value="valo" /> - </antcall> + + <target name="theme-and-default-widgetset" depends="resolve"> + <!-- threadCount is ignored unless threadsPerProcessor is 0 --> + <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1"> + <antcall target="default-widgetset" inheritRefs="true" /> + <antcall target="themes" inheritRefs="true" /> + <antcall target="vaadinPush.js" inheritRefs="true" /> + </parallel> + </target> + + <target name="themes" depends="resolve"> + <!-- threadCount is ignored unless threadsPerProcessor is 0 --> + <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1"> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="base" /> + </antcall> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="runo" /> + </antcall> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="reindeer" /> + </antcall> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="chameleon" /> + </antcall> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="liferay" /> + </antcall> + <antcall target="compile-theme" inheritRefs="true"> + <param name="theme" value="valo" /> + </antcall> + </parallel> </target> - <target name="compile-theme"> + <target name="compile-theme" depends="resolve"> <java classname="com.vaadin.buildhelpers.CompileTheme" failonerror="yes" fork="yes"> <classpath refid="classpath" /> <jvmarg value="-Djava.awt.headless=true" /> @@ -74,18 +90,18 @@ <target name="default-widgetset"> - <antcall target="compile-widgetset"> + <antcall target="compile-widgetset" inheritRefs="true"> <param name="widgetset" value="com.vaadin.DefaultWidgetSet" /> </antcall> </target> <target name="testing-widgetset"> - <antcall target="compile-widgetset"> + <antcall target="compile-widgetset" inheritRefs="true"> <param name="widgetset" value="com.vaadin.tests.widgetset.TestingWidgetSet" /> </antcall> </target> - <target name="compile-widgetset"> + <target name="compile-widgetset" depends="resolve"> <property name="module" value="${widgetset}" /> <property name="module.output.dir" location="WebContent/VAADIN/widgetsets" /> <property name="style" value="PRETTY" /> @@ -125,7 +141,7 @@ <jvmarg value="-Dgwt.persistentunitcache=false" /> </java> </target> - <target name="vaadinPush.js"> + <target name="vaadinPush.js" depends="resolve"> <ant antfile="${basedir}/push/build.xml" target="vaadinPush.js" dir="${basedir}/push" /> <property name="js.output.dir" location="WebContent" /> <property name="push.js.dir" location="${basedir}/push/result/js" /> |