SubAnt performance

View: New views
5 Messages — Rating Filter:   Alert me  

SubAnt performance

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: SubAnt performance

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-09-25, Raja Nagendra Kumar <Nagendra.Raja@...> 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@...
For additional commands, e-mail: dev-help@...


Re: SubAnt performance

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>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.

basically subant in some senarios could act as antcall to  have good performance

Regards,
Regards,
Nagendra

Re: SubAnt performance

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-09-25, Raja Nagendra Kumar <Nagendra.Raja@...> 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@...
For additional commands, e-mail: dev-help@...


Re: SubAnt performance

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>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