Quantcast

Speeding up Ant release target for modules

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Speeding up Ant release target for modules

Steven Yi
Hi All,

I'm not sure if this is something that's been mentioned already, but
for ant-based NB Platform builds, I updated some module's build.xml
files here to only copy modified files within release/ folders.  The
ant XML I used was:

    <target name="release" depends="files-init" if="has.release.dir">
        <mkdir dir="${cluster}"/>
        <copy todir="${cluster}">
            <fileset dir="${release.dir}">
                <patternset includes="${release.files}"/>
                <modified/>
            </fileset>
        </copy>
    </target>

    <target name="clean" depends="projectized-common.clean">
        <delete file="cache.properties"/>
    </target>

The addition of <modified/> does the tracking of file changes, and the
overriding of clean to delete cache.properties ensures that files will
be recopied into the cluster's build folder after a clean.

The issue I had is that for a few of my modules, I had a large amount
of files in the release/ folders (e.g., a user manual module that had
1000's of html and resource files, a Jython module that had the
expanded pythonLib that goes with jython, etc.).  Doing full builds
during develop was slowed down due to copying of files.  Using this
seems to speed things up here.

Anyways, hope that's useful!  If anyone sees an issue with this, I'd
welcome any feedback.

Thanks!
steven
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speeding up Ant release target for modules

Steven Yi
One additional note, I just modified the use of <modified/> to be
<modified update="true"/>.  This is my first time using the modified
tag but it seems like updating the cache in this instance is the right
thing to do, and the default is false.

On Thu, Jan 19, 2017 at 4:15 PM, Steven Yi <[hidden email]> wrote:

> Hi All,
>
> I'm not sure if this is something that's been mentioned already, but
> for ant-based NB Platform builds, I updated some module's build.xml
> files here to only copy modified files within release/ folders.  The
> ant XML I used was:
>
>     <target name="release" depends="files-init" if="has.release.dir">
>         <mkdir dir="${cluster}"/>
>         <copy todir="${cluster}">
>             <fileset dir="${release.dir}">
>                 <patternset includes="${release.files}"/>
>                 <modified/>
>             </fileset>
>         </copy>
>     </target>
>
>     <target name="clean" depends="projectized-common.clean">
>         <delete file="cache.properties"/>
>     </target>
>
> The addition of <modified/> does the tracking of file changes, and the
> overriding of clean to delete cache.properties ensures that files will
> be recopied into the cluster's build folder after a clean.
>
> The issue I had is that for a few of my modules, I had a large amount
> of files in the release/ folders (e.g., a user manual module that had
> 1000's of html and resource files, a Jython module that had the
> expanded pythonLib that goes with jython, etc.).  Doing full builds
> during develop was slowed down due to copying of files.  Using this
> seems to speed things up here.
>
> Anyways, hope that's useful!  If anyone sees an issue with this, I'd
> welcome any feedback.
>
> Thanks!
> steven
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speeding up Ant release target for modules

Enrico Scantamburlo
thanks!

On Thu, Jan 19, 2017 at 10:27 PM, Steven Yi <[hidden email]> wrote:
One additional note, I just modified the use of <modified/> to be
<modified update="true"/>.  This is my first time using the modified
tag but it seems like updating the cache in this instance is the right
thing to do, and the default is false.

On Thu, Jan 19, 2017 at 4:15 PM, Steven Yi <[hidden email]> wrote:
> Hi All,
>
> I'm not sure if this is something that's been mentioned already, but
> for ant-based NB Platform builds, I updated some module's build.xml
> files here to only copy modified files within release/ folders.  The
> ant XML I used was:
>
>     <target name="release" depends="files-init" if="has.release.dir">
>         <mkdir dir="${cluster}"/>
>         <copy todir="${cluster}">
>             <fileset dir="${release.dir}">
>                 <patternset includes="${release.files}"/>
>                 <modified/>
>             </fileset>
>         </copy>
>     </target>
>
>     <target name="clean" depends="projectized-common.clean">
>         <delete file="cache.properties"/>
>     </target>
>
> The addition of <modified/> does the tracking of file changes, and the
> overriding of clean to delete cache.properties ensures that files will
> be recopied into the cluster's build folder after a clean.
>
> The issue I had is that for a few of my modules, I had a large amount
> of files in the release/ folders (e.g., a user manual module that had
> 1000's of html and resource files, a Jython module that had the
> expanded pythonLib that goes with jython, etc.).  Doing full builds
> during develop was slowed down due to copying of files.  Using this
> seems to speed things up here.
>
> Anyways, hope that's useful!  If anyone sees an issue with this, I'd
> welcome any feedback.
>
> Thanks!
> steven

Loading...