0

My build performance measurements suggest that, since my ant build is structured as a multipass process with iteration over the projects at the top level, we're spending a surprisingly large chunk of our build time re-reading the project build scripts and all their includes (reloading these in every pass's ant/antcall invocations).

Is there a reasonable way to tell Ant to retain all the parsed XML in memory until we're done? Or do I need to look at restructuring to combine some of those passes, to eliminate this overhead manually?

FWIW, I'm using Ant 1.8 right now. If 1.9 adds a solution for this, that might be the argument I need to justify an upgrade.

keshlam
  • 7,931
  • 2
  • 19
  • 33
  • You should avoid antcall at all ! I won't repeat all details here, see http://stackoverflow.com/q/5936947 . After all antcall is also a performance killer.. – Rebse Jun 09 '15 at 06:58
  • In general I agree. However, I'm stuck with maintaining what we've got, for now... despite "variables named SHAMROCK and RAINBOW and MISTYMORNINGDEW, and some of the most ferocious assembly language subroutines to be found outside the jungles of Borneo." (Quoting Mike Rubin's parable of _The Programmer And The Elves_) – keshlam Jun 09 '15 at 13:22

1 Answers1

0

It is not correct for ant to "remember" the xml it read. For example, should it remember the raw XML or evaluated expressions?

Consider running performance monitor and optimize tasks and and targets.

Jayan
  • 18,003
  • 15
  • 89
  • 143
  • I've been running performance modelling (our own, for historical reasons). It reports Ant imports consume almost 20 minutes of the build I'm interested in. I can refactor bur it's a large: enough codebase that it's worth checking alternatives. However, if official Ant semantics are such that it can't cache (which I agree looks likely) I'll cope. Never hurts to ask. – keshlam Jun 08 '15 at 17:07