ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31930] - Zip & Unzip tasks major slowdown
Date Tue, 09 Nov 2004 02:57:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31930>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31930

Zip & Unzip tasks major slowdown





------- Additional Comments From kevin.jackson@it.fts-vn.com  2004-11-09 02:57 -------
I looked at this last night, and noticed that there are a lot of enumerations
and Vectors in ths code.  I'm not sure that synchronisation issues would occur
if the implementation was changed to an unsynchronised collection (ArrayList for
example), but that should speed up reading the entries (I've not made any
changes and tested, so this is only supposition based on the performance hit
that synchronisation incurs).  

Also, the loops are not optimal in terms of the idioms used
while(enumeration.hasMoreElements()) is an extra method call per iteration

for(int i=0, size=vector.size; i< size;) {
vector.get(i);
}
is a little faster (in my experience) for tighter loops, and you don't have to
create an enumeration.  Problem is code is more difficult to parse quickly!

small loop unrolls *may* help, but only in the case where there are large
filesets, small Zip files would probably show little or no benefit.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message