On 2010-03-22, <christoph.groth...@isr.de> wrote:

> I upgraded from Ant version 1.7.1 to version 1.8.0 and noticed that the
> performance of my build dropped dramatically. I tracked down the
> performance loss to an area of my build script where I operate heavily
> with the Ant-Contrib "For" and "Variable" tasks on a path-like structure.
> In effect I loop over the contents of a fileset and append a string for
> each element to a property, which is updated via the "Variable" task. I
> noticed that, the bigger the fileset is, the greater is the performance
> loss (9 seconds with Ant 1.7.1 versus 3 Minutes with Ant 1.8.0 for a big
> fileset!).

This could mean the "variable" task has been slowed down (since the
string gets longer with each invocation) or the loop itself has been
slowed down.  Can you isolate the two possibilities by not doing
anything inside the loop?

I'm not too familiar with the for task, but you say you are using a
"path-like structure" in one place and "fileset" in another.  In case it
is a <path> it may be that Ant 1.7.1 used to cache its contents while it
no longer does so for 1.8.0 (and thus would rescan the filesystem on
each iteration) - hmm, I think it shouldn't have been cached in 1.7.1
either <https://issues.apache.org/bugzilla/show_bug.cgi?id=41151>.

Anyway, there is a (undocumented) cache attribute on <path>, can you set
this to true and see whether it helps?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to