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

Performance of InputStream.readAllBytes() could be improved

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b01
    • Verification:
      Verified

      Backports

        Description

        InputStream.readAllBytes() currently uses intermediate buffers of geometrically increasing size with a copy into each intermediate buffer at each stage. It is possible to improve the memory usage and performance using an alternate algorithm of storing a list of fixed size buffers and gathering those into a single buffer at the end.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bpb Brian Burkhalter
                Reporter:
                bpb Brian Burkhalter
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: