commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IO-296) ReaderInputStream optimization: more efficient reading of small chunks of data
Date Thu, 01 Mar 2012 15:37:58 GMT

     [ https://issues.apache.org/jira/browse/IO-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved IO-296.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.2
    
> ReaderInputStream optimization: more efficient reading of small chunks of data
> ------------------------------------------------------------------------------
>
>                 Key: IO-296
>                 URL: https://issues.apache.org/jira/browse/IO-296
>             Project: Commons IO
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Oleg Kalnichevski
>             Fix For: 2.2
>
>         Attachments: commons-io-readerinputstream-optimization.patch
>
>
> 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. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message