You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Antoine Levy Lambert <an...@gmx.de> on 2010/03/02 01:33:19 UTC

Re: 1.8 Performance Degradation

Hello Stefan,

I was wondering whether some code in the Redirector class could not play 
a part in the performance of attrib.

I have seen that Redirector is used by Attrib because it is based on ExecOn.

Looks like there are more occurences of synchronized in Redirector in 
the current code base compared to 1.7.x

If I understand well, <exec/> does not use a redirector unless you 
explicitly request one.

Regards,

Antoine

Stefan Bodewig wrote:
> On 2010-03-01, Murray, Mike <mb...@ptc.com> wrote:
>
>   
>> Has anyone else noticed a degradation with 1.8.0?
>>     
>
> Yes, for any <exec> type of task on Windows (this includes, for example,
> <attrib>) that used to take way less than a second.
>
> Currently each such <exec> takes at least a second (give or take a few
> millis) so if you are using a lot of little <exec>s this will sum up.
>
> The reason behind this is that Ant 1.7.1's logic could make processes
> hang on Windows and the revised logic involves timed joins to simulate
> async reads.  We may get through with making the sleep interval a little
> bit smaller in future versions - or we may find a better fix for
> <https://issues.apache.org/bugzilla/show_bug.cgi?id=5003>
>
> Stefan
>
>   


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


Re: 1.8 Performance Degradation

Posted by Antoine Levy Lambert <an...@gmx.de>.
Stefan Bodewig wrote:
>
> If you run the testcase I've committed to the antunit tests (in
> antunit/taskdefs/optional/windows) with Ant 1.7.1 it takes 0.3s on my
> notebook, with Ant 1.8.0 it takes about ten seconds.  Now, if you reduce
> the constants used for the sleep and join methods in PumpStreamHandler
> and StreamPumper from 500 and 100 to - say - 50 and 20 it goes down to
> 1.2s.  The time really is dominated by the join timeout and currently
> you can't seem to have any single execution that takes less than a
> second.
>   
That's nice.
> We can neglect the effect if the execution itself takes several seconds,
> but with small things like <attrib> the delay becomes an issue.
>   
Someone reported on stack overflow that a db backup takes ages under Ant 
1.8.0. [1] I suppose this db-backup is just one process.
Maybe this process produces a lot of output on stderr and stdout.
> Before I just commit smaller constants I wanted to revisit the issue -
> and before I really do that I want to wait until you are ready with your
> changes so we don't trip on each other's toes.
>   
I am done. Unless my change of yesterday evening broke something.

Regards,

Antoine

[1] http://stackoverflow.com/questions/2305301/ant-1-8-0-low-performance
> Stefan
>
>   


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


Re: 1.8 Performance Degradation

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-03-02, Antoine Levy Lambert <an...@gmx.de> wrote:

> I was wondering whether some code in the Redirector class could not
> play a part in the performance of attrib.

> I have seen that Redirector is used by Attrib because it is based on ExecOn.

> Looks like there are more occurences of synchronized in Redirector in
> the current code base compared to 1.7.x

That's not really that much of an issue.

If you run the testcase I've committed to the antunit tests (in
antunit/taskdefs/optional/windows) with Ant 1.7.1 it takes 0.3s on my
notebook, with Ant 1.8.0 it takes about ten seconds.  Now, if you reduce
the constants used for the sleep and join methods in PumpStreamHandler
and StreamPumper from 500 and 100 to - say - 50 and 20 it goes down to
1.2s.  The time really is dominated by the join timeout and currently
you can't seem to have any single execution that takes less than a
second.

We can neglect the effect if the execution itself takes several seconds,
but with small things like <attrib> the delay becomes an issue.

Before I just commit smaller constants I wanted to revisit the issue -
and before I really do that I want to wait until you are ready with your
changes so we don't trip on each other's toes.

Stefan

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