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

David Smiley updated SOLR-2679:
-------------------------------

    Fix Version/s:     (was: 4.7)
                   4.8

> Optimize memory usage in JavaBinCodec.readStr()
> -----------------------------------------------
>
>                 Key: SOLR-2679
>                 URL: https://issues.apache.org/jira/browse/SOLR-2679
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - java, Response Writers, update
>    Affects Versions: 3.3
>            Reporter: Maxim Valyanskiy
>             Fix For: 4.8
>
>         Attachments: SOLR-2679.patch
>
>
> In Solr 3.3, JavaBinCodec.readStr() reads complete string into byte[] and 
> then converts it into String. FastInputStream is already buffered, so this it 
> not necessary and may take a lot of memory if data string is large.
> This patch replaces usage of big byte[] with usage of dis.readUnsignedByte() 
> for getting characters directly from stream.
> Patch reduces memory usage and may slightly improve performance of reading 
> text data in javabin-codec.
> JavaBinCodec.readStr() function already has unit test in TestJavaBinCodec, no 
> additional unit test is required.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to