You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2016/12/02 07:34:02 UTC

[jira] [Created] (HBASE-17235) Minor improvement in creation of CIS for onheap buffer cases

ramkrishna.s.vasudevan created HBASE-17235:
----------------------------------------------

             Summary: Minor improvement in creation of CIS for onheap buffer cases
                 Key: HBASE-17235
                 URL: https://issues.apache.org/jira/browse/HBASE-17235
             Project: HBase
          Issue Type: Improvement
            Reporter: ramkrishna.s.vasudevan
            Assignee: ramkrishna.s.vasudevan
            Priority: Minor


{code}
      if (buf.hasArray()) {
        cis = CodedInputStream.newInstance(buf.array(), offset, buf.limit());
      } else {
{code}
Currently we do this for onheap buffers incase there is no reservoir or the size is less than the minSizeforReservoir. I could see that even if reservoir is there there are requests which goes with the above way of creating CIS. This could be made efficient to avoid underlying copies by just doing this
{code}
cis = UnsafeByteOperations.unsafeWrap(buf.array(), offset, buf.limit()).newCodedInput();
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)