ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael D. Norman" <micha...@mdnterprises.com>
Subject StreamPumper sleeping for no reason
Date Wed, 13 Mar 2002 19:47:14 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message