ZipFile speed improvement patch

Mark Wielaard mark@klomp.org
Sun Oct 27 05:34:00 GMT 2002


Hi,

The following makes opening a new ZipFile a bit more efficient.
RandomAccessFile in libgcj is a bit more efficient then the Classpath
version but I still managed to save a couple of hunderd miliseconds with
an application that opened large numbers of zip and jar files. (The same
test with Classpath+Kissme saved multiple seconds!)

2002-10-27  Mark Wielaard  <mark@klomp.org>

  * java/util/zip/ZipFile.java (readLeShort): Take and use DataInput as
  argument.
  (readLeShort): Likewise and use byte[].
  (readLeInt): Likewise.
  (readEntries): Use new versions of methods and use byte[] for reading
  a complete zip entry. Add ZipFile name to exceptions.
  (entries): Add ZipFile name to exceptions.
  (getEntry): Likewise.
  (checkLocalHeader): Use new versions of methods and add ZipFile name
  to exceptions.

OK to commit?

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZipFile.patch
Type: text/x-patch
Size: 5626 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20021027/20afb7d6/attachment.bin>


More information about the Java-patches mailing list