Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242864

Increase the default, internal buffer size of the Streams in java.util.zip

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 15
    • Fix Version/s: None
    • Component/s: performance
    • Labels:
      None

      Description

      DeflaterInputStream, GZIPInputStream, GZIPOutputStream, InflaterInputStream, DeflaterOutputStream all use an internal byte buffer of 512 bytes by default.

      While this buffer size is configurable, increasing the default to a bigger size (e.g. 4096 bytes) can considerably speed up (up to 50%) read and write operations on these streams when they are created with the default buffer size.

      Some performance numbers for InflaterOutputStream can be found in the JMH benchmark attached to JDK-8242848.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              simonis Volker Simonis
              Reporter:
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: