[
https://issues.apache.org/jira/browse/OAK-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Parvulescu resolved OAK-5910.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.7.2)
1.7.0
applied the patch with http://svn.apache.org/viewvc?rev=1790536&view=rev
> Reduce copying of data when reading mmapped records
> ---------------------------------------------------
>
> Key: OAK-5910
> URL: https://issues.apache.org/jira/browse/OAK-5910
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Alex Parvulescu
> Assignee: Alex Parvulescu
> Labels: memory, performance
> Fix For: 1.7.0, 1.8
>
> Attachments: OAK-5910.patch
>
>
> The idea is to reduce the amount of extra byte buffers created when reading
> mmapped records, if possible pushing the ByteBuffer all the way to the
> consumer.
> For example reading a String from a Segment right now means first reading the
> bytes of of the record into a byte array, then creating a string with an
> encoding (which behind the scenes will copy the byte array again and run it
> through the decoder). An alternative is to call {{decode}} on the Charset and
> pass in the ByteBuffer, skipping the intermediate operations.
> There are a few cases of this I included in the patch, but there may be
> others (like the {{SegmentStream}} which needs a full rewrite).
> Interested in what others think of this!
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)