Any shell task that uses output or error streams extensively (e.g. CPP) take
inordinately long in Ant compared to running it from the command line (a
difference from 30 seconds to 10+ minutes).  This is due to the fact that
org.apache.tools.ant.taskdefs.StreamPumper sleeps for 5ms after it reads 128
bytes.  Because the executing thread will block until the existing output is
cleared and the StreamPumper would block when there is no more input, there
should be no reason to sleep.

The only solution I found is to use my own task definition and use my own
PumpStreamHandler with its own StreamPumper.  Could we get this fixed for
all exec tasks?  The simplest approach is to just remove the
Thread.sleep(...) call.

Thanks,
-- Michael


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to