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

Oleg Kalnichevski updated IO-296:
---------------------------------

    Attachment: commons-io-readerinputstream-optimization.patch

The proposed patch should improve efficiency and (potentially) performance of 
ReaderInputStream reading small chunks of data.

Please review.

Oleg
                
> 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
>         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

        

Reply via email to