[ 
https://issues.apache.org/jira/browse/CASSANDRA-6697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13900273#comment-13900273
 ] 

Benedict commented on CASSANDRA-6697:
-------------------------------------

One last update to this thought process for now: The approach outlined in the 
current patch has the added benefit of trivially being optimised to NO-OPs for 
on-heap memtables through a private static final field set from information in 
DatabaseDescriptor (which should literally mean its removal by the C2 
compiler). Given this, and that it would mean if we *did* introduce any weird 
bugs they could trivially be pinned down to here, and would not affect the 
current implementation - and that there aren't *that* many places outside of 
test cases where care would be needed, I'm now leaning reasonably strongly in 
favour of this route. 



> Refactor Cell and CellName ByteBuffer accessors to avoid garbage allocation 
> where possible
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6697
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6697
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>             Fix For: 2.1
>
>
> This is a prerequisite for CASSANDRA-6694.
> The basic idea is to, if unsafe is available, abuse it to modify preallocated 
> ByteBuffers so that when they are short lived they do not need to be 
> instantiated. Initially this will only be helpful for comparisons and lookups 
> on the BBs, but with some modifications to the read path we should be able to 
> reduce the need in CASSANDRA-6694 to construct BBs to pass to the native 
> protocol (thrift may have to continue as is)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to