Commons Compress
  1. Commons Compress
  2. COMPRESS-46

ZipOutputStream is slow when compressing big files

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      This has been reported against Ant's version, the grandfather of commons-compress. See https://issues.apache.org/bugzilla/show_bug.cgi?id=45396

      Splitting up the array passed into Deflater.setInput improves the performance dramatically. Ant's change is http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/zip/ZipOutputStream.java?r1=579278&r2=677272&pathrev=677272

      1. patch-zip-update.txt
        139 kB
        Christian Grobmeier

        Issue Links

          Activity

          Hide
          Christian Grobmeier added a comment -

          This is fixed since Compress Code has been update to latest Ant code yesterday. Please close.

          Show
          Christian Grobmeier added a comment - This is fixed since Compress Code has been update to latest Ant code yesterday. Please close.
          Hide
          Stefan Bodewig added a comment -

          Unless I'm looking at a completely wrong file http://svn.eu.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java?revision=702287 is very different from the latest Ant version.

          Ant's ZipOutputStream doesn't extend DeflaterOutputStream and the performance issue I reported is not addressed (but may not appear either, since DeflaterOutputStream might be taking care of it).

          Show
          Stefan Bodewig added a comment - Unless I'm looking at a completely wrong file http://svn.eu.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java?revision=702287 is very different from the latest Ant version. Ant's ZipOutputStream doesn't extend DeflaterOutputStream and the performance issue I reported is not addressed (but may not appear either, since DeflaterOutputStream might be taking care of it).
          Hide
          Christian Grobmeier added a comment -

          Stefan, you are right.
          I have updated BZip of course, not Zip. It's quite hard with all these patches around me currently

          However, attached is the patch file which updates compress to the current ZIP implementation of Ant. Thanks for shouting!

          Show
          Christian Grobmeier added a comment - Stefan, you are right. I have updated BZip of course, not Zip. It's quite hard with all these patches around me currently However, attached is the patch file which updates compress to the current ZIP implementation of Ant. Thanks for shouting!

            People

            • Assignee:
              Torsten Curdt
              Reporter:
              Stefan Bodewig
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development