ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: junit tests running slower in 1.8 than in 1.7
Date Sun, 08 Aug 2010 20:12:02 GMT
On 2010-08-02, Stefan Bodewig wrote:

> Now I can confirm I see some differences on the Windows machine as well.
> There is almost no difference for the tests that get run first (which
> take longer than the code-identical subsequent tests), so the warmup
> time hasn't changed much.

> I'll try to find the reason for this.

Found it, and there won't be a simple fix for it.

The reason really is Ant's changed I/O handling of forked processes and
that's why you see the impact on Windows.  I've taken the svn tag
matching Ant 1.7.1 and replaced two classes (StreamPumper and
PumpStreamHandler) with their Ant 1.8.0 cousins and see the performance
numbers of Ant 1.8.0.

With Ant 1.8.0 I/O handling has been changed on Windows to ensure Ant
doesn't hang indefinitely in the presence of grandchild-processes, so
without that change Ant simply doesn't wirk correctly and a loss in
performance is the price we have to pay.

What was puzzling me for a long time was why the changes affect the
forked VM at all when your testcases don't create any output - and even
if they did, output would be sent batched to the listeners at the end of
each testsuite.

Finally I found the reason - the enhancement that is Bugzilla Issue
31885.  Ant writes output synchronously in order to support advanced
test UIs.  Here you pay for a feature you don't want to use and in fact
if I disable these events, I get better performance than with stock Ant

I'll suggest to add a configuration option that will allow people to
disbale those requests on the dev list, but right now I can't do more
than confirm that forked JUnit tasks are slower with Ant 1.8.[01] than
with 1.7.1.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message