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 and & Unzip tasks major slowdown
Summary: Zip and & Unzip tasks major slowdown
Product: Ant
Version: 1.6.2
Platform: PC
OS/Version: Other
Status: NEW
Severity: Critical
Priority: Other
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: ant-venkatp@sneakemail.com
We have a big web application and we use Ant to build it. We also have written a
config util to be used during deploy time using Ant.
Beginning with 1.6.x, the build as well as the config utility has slowed down
significantly. The difference is in the order of two times for build and for the
config util in the order of four times. Upon digging into it further, I
discovered that the replacement Zip/Unzip functions to support file name
encodings from the following files are very slow:
org.apache.tools.zip.ZipFile
org.apache.tools.zip.ZipOutputStream
My test included three class of processors Pentium III, Pentium IV, and Pentium
M. Of the three, the problem is almost not visible in Pentium M. The P IV is
slower than Pentium M and Pentium III is slower than Pentium IV. To prove this
problem, I conducted the following tests (files are attached to the case). My
test case only demonstrate the problem with ZipFile class though there is a
problem with ZipOutputStream also:
I have taken three different ZipFile classes namely from Sun JDK's built-in
(java.util.zip package), JazzLib (Same as the one that comes with GNU Classpath
but available as standalone from http://jazzlib.sourceforge.net) and Apache Util
ZipFile (The one mentioned above and used by Ant to support file encoding).
Using each of the three, I read the JDK's tools.jar and throw away the read
data. This operation is timed for comparison. I run this test in both a Pentium
M laptop and Pentium III laptop. I picked JazzLib because it is also a pure Java
implementation of ZipFile. Here are the results. Times are in milliseconds:
Pentium M
Time taken for JazzZipFile Read: 70
Time taken for JavaZipFile Read: 40
Time taken for ApacheZipFile Read: 321
Pentium III
Time taken for JazzZipFile Read: 250
Time taken for JavaZipFile Read: 151
Time taken for ApacheZipFile Read: 941
The above results show that JazzZipFile is only slighly slower than the Sun's
JDK ZipFile but Apache ZipFile is quite a bit slower when compared to Sun.
Attached:
ZipFilePerfTestCase.java
jazzlib-binary-0.07.jar (JazzLib jar file. 50k size)
To compile and run the file you will need, ant.jar, junit.jar and
jazzlib-binary-0.07.jar.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|