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

Performance of Ant

Hi,

On a professional product build scripts, we see the need for calling many
times <antcall> to call a particular target. However due to isolation level
for this target calls.. there is a huge penalty on performance.

Is there a way to call another target in the same build context and with no
isolation needed.

For now we are using the custom task which calls project.executeTarget()..
which seem to invoke the target in the same build context and hence
performance is too great.

However in case ant forum feels such a need.. it would be nice to have
antcall to have another option or another tag which does exactly this.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com


-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25676250.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Performance of Ant

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Friday, October 02, 2009 3:25 PM
To: user@ant.apache.org
Subject: Re: Performance of Ant <antcall>

/*
On 2009-10-02, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

> I have put the summary of discussion and need for a new task as per this
> discussions in ant-contrib.

I think you've misunderstood what I was trying to say.  ant-contrib
already has such a task:

<http://ant-contrib.sourceforge.net/tasks/tasks/runtarget.html>

*/

There's also the <call> task from Antelope, see =
http://antelope.tigris.org/nonav/docs/manual/bk03ch21.html


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


Re: Performance of Ant

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Oops.. It is nice to know that ant-contrib already has it.
-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25716730.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Performance of Ant

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

> I have put the summary of discussion and need for a new task as per this
> discussions in ant-contrib.

I think you've misunderstood what I was trying to say.  ant-contrib
already has such a task:

<http://ant-contrib.sourceforge.net/tasks/tasks/runtarget.html>

> The same is available at

> http://www.nabble.com/Need-for-a-new-task-to-call-the-target-without-isolation-to25714539.html

This message never reached the ant-contrib-developers mailing list, see
<http://sourceforge.net/mailarchive/forum.php?forum_name=ant-contrib-developers>
- maybe the list doesn't support Nabble.

Stefan

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


Re: Performance of Ant

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Hi Stefan

I have put the summary of discussion and need for a new task as per this
discussions in ant-contrib.

The same is available at 

http://www.nabble.com/Need-for-a-new-task-to-call-the-target-without-isolation-to25714539.html

Regards,
Nagendra
-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25714572.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Performance of Ant

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

>> I will note that the ant-contrib project provides a task to invoke a
>> target.

> O.k,  thanks. Do I need to post this in ant-contrib forum.

If you have question about ant-contrib's task(s), then their forum will
be better suited than this list, yes.

Stefan

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


Re: Performance of Ant

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
> Ant's goal is to be declarative in nature.

O.k

> I will note that the ant-contrib project provides a task to invoke a
> target.

O.k,  thanks. Do I need to post this in ant-contrib forum.

Regards,
Nagendra
-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25712948.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Performance of Ant

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

> This could be one workaround due to lack of straight approach to call the
> target.
> I am surprised why such a thing did not exist from day one.. Pl. let me know
> if this approach has any ant design related issues.

Any ability to call directly makes the build file more procedural.  The
depends attribute is declarative.  Ant's goal is to be declarative in
nature.

I will note that the ant-contrib project provides a task to invoke a
target.

If you find yourself calling targets with different parameters it
usually really means you need some sort of task that doesn't exist.
macrodef is a way to write a task in Ant instead of a real programming
language.

Stefan

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


Re: Performance of Ant

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Hi Stefan,

This could be one workaround due to lack of straight approach to call the
target.
I am surprised why such a thing did not exist from day one.. Pl. let me know
if this approach has any ant design related issues.

I see macros are callable directly, targets would also be called though
dependents , but with in the target calling another target is not straight
(isolation principles are being applied in all the existing tasks antcall,
subant, ant).

For now we did write light wait target call as custom task and preformance
has improved a lot (in over case there were 6 ant calls)

Regards,
Nagendra

Stefan Bodewig wrote:
> 
> On 2009-09-30, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
> 
>> Yes, I could but I loose the flexibility of calling from command line.
> 
> <macrodef name="originalTarget">
>   <sequential>
>     original-content-of-your-target
>   </sequential>
> </macrodef>
> 
> <target name="originalTarget">
>   <!-- may need to set attributes from property values -->
>   <originalTarget/>
> </target>
> 
> should work for that usecase.
> 
>> To our surprise.. when such a changes are done, they work from xml but it
>> does not work custom task (based on project.createTask() and execute() )
>> methods.
> 
> If you mean Project#createTask doesn't work for macrodef-ed or
> presetdef-ed tasks - this is true.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25710855.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Performance of Ant

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

> Yes, I could but I loose the flexibility of calling from command line.

<macrodef name="originalTarget">
  <sequential>
    original-content-of-your-target
  </sequential>
</macrodef>

<target name="originalTarget">
  <!-- may need to set attributes from property values -->
  <originalTarget/>
</target>

should work for that usecase.

> To our surprise.. when such a changes are done, they work from xml but it
> does not work custom task (based on project.createTask() and execute() )
> methods.

If you mean Project#createTask doesn't work for macrodef-ed or
presetdef-ed tasks - this is true.

Stefan

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


Re: Performance of Ant

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Yes, I could but I loose the flexibility of calling from command line.

To our surprise.. when such a changes are done, they work from xml but it
does not work custom task (based on project.createTask() and execute() )
methods.

Regards,
Nagendra


Stefan Bodewig wrote:
> 
> On 2009-09-30, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
> 
>> On a professional product build scripts, we see the need for calling many
>> times <antcall> to call a particular target. However due to isolation
>> level
>> for this target calls.. there is a huge penalty on performance.
> 
>> Is there a way to call another target in the same build context and with
>> no
>> isolation needed.
> 
> Isn't there any way you could turn your target into a <macrodef>?
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Performance-of-Ant-%3Cantcall%3E-tp25676250p25677907.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Performance of Ant

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

> On a professional product build scripts, we see the need for calling many
> times <antcall> to call a particular target. However due to isolation level
> for this target calls.. there is a huge penalty on performance.

> Is there a way to call another target in the same build context and with no
> isolation needed.

Isn't there any way you could turn your target into a <macrodef>?

Stefan

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