You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2009/09/25 04:52:01 UTC

SubAnt performance

Hi,

Currently I see <subant> is launching new ant even if the build file is same
as the current one being executed.

Would it not be more fast to excute the target in the current ant process it
self, provided build file and directory are same.

Regards,
Nagendra
-- 
View this message in context: http://www.nabble.com/SubAnt-performance-tp25605193p25605193.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: SubAnt performance

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
>Then I'd think subant is the wrong task in that context.  I don't
> understand why you'd be calling subant "on yourself" anyway.

we have a target like 'clean' which deletes current directories 'build'
folder and calls all the sub directories clean target. The sub directories
build build file calls the same clean target..

the clean targets is impl. some thing very similar to recursions with
different directory roots sets by subant.

Regards,
Nagendra  
-- 
View this message in context: http://www.nabble.com/SubAnt-performance-tp25605193p25622292.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: SubAnt performance

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-09-25, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

>> isolation between the calling and thecalled project.

> stefan, it is true of inherit* properties, however here are some
> scenarios

Then I'd think subant is the wrong task in that context.  I don't
understand why you'd be calling subant "on yourself" anyway.

The depends attribute on target or a macrodef sound like better
solutions.

> 2. the inherit properties are set to true only and isolation is not a
> concern in such scenario.

How would subant know that isolation is not a concern?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: SubAnt performance

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
>isolation between the calling and thecalled project.

stefan, it is true of inherit* properties, however here are some scenarios 

1. The developers may want to call clean, startTomcat... etc and some other
targets from root to all the sub directories. However module developers are
more interested in current module only (as there would be no sub build.xml
files any way)
2. the inherit properties are set to true only and isolation is not a
concern in such scenario.

I know does complicate subant to be little context aware.. but if there are
no side effects as in the above context,  it could boost performance
specially what if many targets are called using subant way.


Regards,
Regards,
Nagendra
-- 
View this message in context: http://www.nabble.com/SubAnt-performance-tp25605193p25606351.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: SubAnt performance

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-09-25, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

> Currently I see <subant> is launching new ant even if the build file is same
> as the current one being executed.

A new Project instance, but not a new process.

> Would it not be more fast to excute the target in the current ant process it
> self, provided build file and directory are same.

It would be faster but it would be something different at the same time
since you'd no longer have any isolation between the calling and the
called project.

Right now the called project doesn't see the references defined in the
calling project (inheritRefs), may not see the properties (inheritAll)
may see temporarily redefined values for properties (nested param tags)
- and nothing the called project does to references or properties has
any effect on the calling project.  All of that wouldn't be possible if
subant was using the same project instance as the calling one.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org