You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2006/04/14 11:21:04 UTC

quicker builds with more recent versions of ant

Just in case this helps anyone else.

I noticed something odd this morning.  Although the default excludes
in ant 1.6.2 correctly ignore .svn directories it doesn't seem to do
so very efficiently.  For example, doing:

ant -f make/build.xml clean
ant -f make/build-java.xml copy-resources

The copy-resources step takes over twice as long with ant 1.6.2 than
with ant 1.6.5.
(Note, the exclude still works and no files in .svn directories are
copied or it would been even slower.  Much older (some 1.5 versions
and older I think) of ant will copy files in .svn directories but i
doubt anyone will see this.)

The reason was obvious when ran:

  strace -o stat.syscalls.log -e stat64 ant -f make/build-java.xml
copy-resources
  fgrep -c /.svn/ stat.syscalls.log

With ant 1.6.2 the fgrep counts 22948 stat calls for files within .svn
directories but with ant 1.6.5 it counts zero!

I mention this because it will undoubtedly slow down builds for anyone
using this version of ant *and* because this version of ant is the
default for Debian stable users so quite a few people will probably be
using this version.

I've upgraded (using ant 1.6.5 which is in unstable).  It's not really
a big deal but it certainly makes a difference if you are running on
slow hardware (or like me doing some testing under an emulator like
qemu).

Regards,
 Mark.

--
Mark Hindess <ma...@googlemail.com>
IBM Java Technology Centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Geir Magnusson Jr <ge...@pobox.com>.
Nice catch.  Lets put this on the website.  It's going to get buried 
here and no one will see it.

geir

Mark Hindess wrote:
> Just in case this helps anyone else.
> 
> I noticed something odd this morning.  Although the default excludes
> in ant 1.6.2 correctly ignore .svn directories it doesn't seem to do
> so very efficiently.  For example, doing:
> 
> ant -f make/build.xml clean
> ant -f make/build-java.xml copy-resources
> 
> The copy-resources step takes over twice as long with ant 1.6.2 than
> with ant 1.6.5.
> (Note, the exclude still works and no files in .svn directories are
> copied or it would been even slower.  Much older (some 1.5 versions
> and older I think) of ant will copy files in .svn directories but i
> doubt anyone will see this.)
> 
> The reason was obvious when ran:
> 
>   strace -o stat.syscalls.log -e stat64 ant -f make/build-java.xml
> copy-resources
>   fgrep -c /.svn/ stat.syscalls.log
> 
> With ant 1.6.2 the fgrep counts 22948 stat calls for files within .svn
> directories but with ant 1.6.5 it counts zero!
> 
> I mention this because it will undoubtedly slow down builds for anyone
> using this version of ant *and* because this version of ant is the
> default for Debian stable users so quite a few people will probably be
> using this version.
> 
> I've upgraded (using ant 1.6.5 which is in unstable).  It's not really
> a big deal but it certainly makes a difference if you are running on
> slow hardware (or like me doing some testing under an emulator like
> qemu).
> 
> Regards,
>  Mark.
> 
> --
> Mark Hindess <ma...@googlemail.com>
> IBM Java Technology Centre, UK.
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Paulex Yang <pa...@gmail.com>.
Matt Benson wrote:
> --- Mark Hindess <ma...@googlemail.com> wrote:
>
>   
>> Just in case this helps anyone else.
>>
>> I noticed something odd this morning.  Although the
>> default excludes
>> in ant 1.6.2 correctly ignore .svn directories it
>> doesn't seem to do
>> so very efficiently.  For example, doing:
>>
>> ant -f make/build.xml clean
>> ant -f make/build-java.xml copy-resources
>>
>> The copy-resources step takes over twice as long
>> with ant 1.6.2 than
>> with ant 1.6.5.
>> (Note, the exclude still works and no files in .svn
>> directories are
>> copied or it would been even slower.  Much older
>> (some 1.5 versions
>> and older I think) of ant will copy files in .svn
>> directories but i
>> doubt anyone will see this.)
>>
>> The reason was obvious when ran:
>>
>>   strace -o stat.syscalls.log -e stat64 ant -f
>> make/build-java.xml
>> copy-resources
>>   fgrep -c /.svn/ stat.syscalls.log
>>
>> With ant 1.6.2 the fgrep counts 22948 stat calls for
>> files within .svn
>> directories but with ant 1.6.5 it counts zero!
>>     
>
> I fixed this.  ;)
>
>   
>> I mention this because it will undoubtedly slow down
>> builds for anyone
>> using this version of ant *and* because this version
>> of ant is the
>> default for Debian stable users so quite a few
>> people will probably be
>> using this version.
>>
>> I've upgraded (using ant 1.6.5 which is in
>> unstable).  It's not really
>>     
>
> "in unstable"?
>
>   
>> a big deal but it certainly makes a difference if
>> you are running on
>> slow hardware (or like me doing some testing under
>> an emulator like
>> qemu).
>>
>>     
>
> It can be painful to install a new version of Ant on a
> Linux system with a preinstalled version.  See
> http://ant.apache.org/faq.html#InstantiationException
> .  So it would be better to uninstall the old version
> when upgrading.
>
> Another performance booster that needs to be made if
> anyone finds the time (I want to do it, but...):
> refactor all the <ant> invocations in the module
> buildfiles to use 1.6+ <import>s.  These allow
> composable, multi-inheritance buildfiles, and because
> all targets execute in the same project context memory
> usage is drastically decreased, while performance is
> noticeably increased.  The top-level buildfiles would
> probably use the <subant> task to invoke the module
> builds.
>
> Finally, know that Ant 1.7 is (finally!) on the
> horizon.  One minor addition it will bring, that
> directly relates to a recent topic here, are the
> "magic properties" ant.build.javac.source and
> ant.build.javac.target .  Anyone wanna guess what they
> do?  And in case anyone wonders, these were not
> introduced for any reason directly related to Harmony;
> this is simply an example of convergent evolution.
>
>   
Amazing! But how about if the compiler won't support these properties, 
like Eclipse compiler(In fact what I really want to say is, this is a 
good example to show Eclipse people that this option can be considered 
as feature instead of bug ;-) )?
> -Matt
>
>   
>> Regards,
>>  Mark.
>>
>> --
>> Mark Hindess <ma...@googlemail.com>
>> IBM Java Technology Centre, UK.
>>
>>
>>     
> ---------------------------------------------------------------------
>   
>> Terms of use :
>> http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail:
>> harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail:
>> harmony-dev-help@incubator.apache.org
>>
>>
>>     
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Mark Hindess <ma...@googlemail.com>.
Hmm... the final subant example looks like exactly what I was trying
to achieve with HARMONY-293:

  http://ant.apache.org/manual/CoreTasks/subant.html

And subant makes it even better.  Will have to look at this a little more.

-Mark.


On 4/14/06, Geir Magnusson Jr <ge...@pobox.com> wrote:
>
>
> Matt Benson wrote:
>
> >
> > Another performance booster that needs to be made if
> > anyone finds the time (I want to do it, but...):
>
> But what? :)
>
> > refactor all the <ant> invocations in the module
> > buildfiles to use 1.6+ <import>s.  These allow
> > composable, multi-inheritance buildfiles, and because
> > all targets execute in the same project context memory
> > usage is drastically decreased, while performance is
> > noticeably increased.  The top-level buildfiles would
> > probably use the <subant> task to invoke the module
> > builds.
> >
> > Finally, know that Ant 1.7 is (finally!) on the
> > horizon.  One minor addition it will bring, that
> > directly relates to a recent topic here, are the
> > "magic properties" ant.build.javac.source and
> > ant.build.javac.target .  Anyone wanna guess what they
> > do?  And in case anyone wonders, these were not
> > introduced for any reason directly related to Harmony;
> > this is simply an example of convergent evolution.
>
> Excellent!
>
> geir
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


--
Mark Hindess <ma...@googlemail.com>
IBM Java Technology Centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Matt Benson <gu...@yahoo.com>.
--- Geir Magnusson Jr <ge...@pobox.com> wrote:
> 
> 
> Matt Benson wrote:
> 
> > 
> > Another performance booster that needs to be made
> if
> > anyone finds the time (I want to do it, but...):
> 
> But what? :)

But I'm stretched thin at all times, thinner than
usual just at present.  :(

hmm... too bad that thinness isn't literal.

-Matt

> 
> > refactor all the <ant> invocations in the module
> > buildfiles to use 1.6+ <import>s.  These allow
> > composable, multi-inheritance buildfiles, and
> because
> > all targets execute in the same project context
> memory
> > usage is drastically decreased, while performance
> is
> > noticeably increased.  The top-level buildfiles
> would
> > probably use the <subant> task to invoke the
> module
> > builds.
> > 
> > Finally, know that Ant 1.7 is (finally!) on the
> > horizon.  One minor addition it will bring, that
> > directly relates to a recent topic here, are the
> > "magic properties" ant.build.javac.source and
> > ant.build.javac.target .  Anyone wanna guess what
> they
> > do?  And in case anyone wonders, these were not
> > introduced for any reason directly related to
> Harmony;
> > this is simply an example of convergent evolution.
> 
> Excellent!
> 
> geir
> 
>
---------------------------------------------------------------------
> Terms of use :
> http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail:
> harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Matt Benson wrote:

> 
> Another performance booster that needs to be made if
> anyone finds the time (I want to do it, but...):

But what? :)

> refactor all the <ant> invocations in the module
> buildfiles to use 1.6+ <import>s.  These allow
> composable, multi-inheritance buildfiles, and because
> all targets execute in the same project context memory
> usage is drastically decreased, while performance is
> noticeably increased.  The top-level buildfiles would
> probably use the <subant> task to invoke the module
> builds.
> 
> Finally, know that Ant 1.7 is (finally!) on the
> horizon.  One minor addition it will bring, that
> directly relates to a recent topic here, are the
> "magic properties" ant.build.javac.source and
> ant.build.javac.target .  Anyone wanna guess what they
> do?  And in case anyone wonders, these were not
> introduced for any reason directly related to Harmony;
> this is simply an example of convergent evolution.

Excellent!

geir

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: quicker builds with more recent versions of ant

Posted by Matt Benson <gu...@yahoo.com>.
--- Mark Hindess <ma...@googlemail.com> wrote:

> Just in case this helps anyone else.
> 
> I noticed something odd this morning.  Although the
> default excludes
> in ant 1.6.2 correctly ignore .svn directories it
> doesn't seem to do
> so very efficiently.  For example, doing:
> 
> ant -f make/build.xml clean
> ant -f make/build-java.xml copy-resources
> 
> The copy-resources step takes over twice as long
> with ant 1.6.2 than
> with ant 1.6.5.
> (Note, the exclude still works and no files in .svn
> directories are
> copied or it would been even slower.  Much older
> (some 1.5 versions
> and older I think) of ant will copy files in .svn
> directories but i
> doubt anyone will see this.)
> 
> The reason was obvious when ran:
> 
>   strace -o stat.syscalls.log -e stat64 ant -f
> make/build-java.xml
> copy-resources
>   fgrep -c /.svn/ stat.syscalls.log
> 
> With ant 1.6.2 the fgrep counts 22948 stat calls for
> files within .svn
> directories but with ant 1.6.5 it counts zero!

I fixed this.  ;)

> 
> I mention this because it will undoubtedly slow down
> builds for anyone
> using this version of ant *and* because this version
> of ant is the
> default for Debian stable users so quite a few
> people will probably be
> using this version.
> 
> I've upgraded (using ant 1.6.5 which is in
> unstable).  It's not really

"in unstable"?

> a big deal but it certainly makes a difference if
> you are running on
> slow hardware (or like me doing some testing under
> an emulator like
> qemu).
> 

It can be painful to install a new version of Ant on a
Linux system with a preinstalled version.  See
http://ant.apache.org/faq.html#InstantiationException
.  So it would be better to uninstall the old version
when upgrading.

Another performance booster that needs to be made if
anyone finds the time (I want to do it, but...):
refactor all the <ant> invocations in the module
buildfiles to use 1.6+ <import>s.  These allow
composable, multi-inheritance buildfiles, and because
all targets execute in the same project context memory
usage is drastically decreased, while performance is
noticeably increased.  The top-level buildfiles would
probably use the <subant> task to invoke the module
builds.

Finally, know that Ant 1.7 is (finally!) on the
horizon.  One minor addition it will bring, that
directly relates to a recent topic here, are the
"magic properties" ant.build.javac.source and
ant.build.javac.target .  Anyone wanna guess what they
do?  And in case anyone wonders, these were not
introduced for any reason directly related to Harmony;
this is simply an example of convergent evolution.

-Matt

> Regards,
>  Mark.
> 
> --
> Mark Hindess <ma...@googlemail.com>
> IBM Java Technology Centre, UK.
> 
>
---------------------------------------------------------------------
> Terms of use :
> http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail:
> harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org