Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-296

ReaderInputStream optimization: more efficient reading of small chunks of data

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None
    • None

    Description

      ReaderInputStream in its current form does not efficiently handle reading of small data chunks. #read(byte[] b, int off, int len) methods compacts encoderOut on every read operation, which is not very efficient if the chunks of data being read are smallish. This especially affects the #read() method, which currently reads one byte of data into a temporary byte array. Not to mention that allocation of a temporary byte array on each #read() method invocation leads to generation of unnecessary intermediate garbage on the heap.

      Attachments

        Activity

          People

            Unassigned Unassigned
            olegk Oleg Kalnichevski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: