loggingMessage = true;
for (int i = 0; i < listeners.size(); i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i);
To this:
loggingMessage = true;
int size = listeners.size();
for (int i = 0; i < size; i++) {
BuildListener listener = (BuildListener) listeners.elementAt(i);
It's not a huge speedup (about 15%) but it makes a difference.
I'm using Ant 1.5.3-1 (compiled from source, obviously) on a 1ghz Powerbook
running OS X 10.2.5 and JDK 1.4.1. My build doesn't have any custom build
listeners, just the default.
If this fix can't be implemented for some reason, please leave this bug open -
IMHO this is a defect that needs to be fixed.