Bug 56978 - Enabling "showoutput" for a JUnit task makes it dramatically slower
Summary: Enabling "showoutput" for a JUnit task makes it dramatically slower
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.9.4
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2014-09-12 17:46 UTC by Andy Lee
Modified: 2014-09-12 18:16 UTC (History)
1 user (show)

JUnit Task (740 bytes, text/plain)
2014-09-12 17:46 UTC, Andy Lee

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Lee 2014-09-12 17:46:07 UTC
Created attachment 32015 [details]
JUnit Task

I have a JUnit test case that prints a considerable amount of text to standard err/out (about 6 MB worth of logging).  If the the junit task is configured with showoutput="true", the test takes much longer (about 14x longer) to run on Windows only (the flag does not seem to significantly affect the speed of the test on our OSX or Linux nodes).

Interestingly, setting printsummary="withOutAndErr" and showoutput="false" does not seem to slow the test down even though it's outputting about the same amount of text, so I don't think it's a problem with console or disk IO speeds.

I've attached what my JUnit task looks like (note that it uses the fork option).

This is the performance I'm seeing on my Windows 7 machine:

With printsummary="withOutAndErr" showoutput="false":
Total time: 1 minute 3 seconds

With printsummary="yes" showoutput="true":
Total time: 14 minutes 30 seconds