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

Increase CipherInputStream buffer size

XMLWordPrintable

      CipherInputStream has a buffer size of 512 bytes. This is very small, and we see better performance from a larger buffer size in our applications. We sometimes see folks even hacking into CIS internals and allocating 8192-sized buffers with reflective hacks to avoid performance penalties.

      As per the comment on the current buffer:

      > the size 512 bytes is somewhat randomly chosen

      Other examples use larger buffers, like 8192 for ChannelInputStream and FileInputStream, or 16384 for InputStream itself.

        There are no Sub-Tasks for this issue.

            ogillespie Oli Gillespie
            ogillespie Oli Gillespie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: