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

huaxiang sun commented on HBASE-20710:
--------------------------------------

Thanks Stack. For the case of  MutationProto (not cell block), it is looping 
cells for each family,  the family should be checked once for all cells under 
it (no need to clone for each cell), will see if similar approach can be taken 
for cell bock.

> extra cloneFamily() in Mutation.add(Cell)
> -----------------------------------------
>
>                 Key: HBASE-20710
>                 URL: https://issues.apache.org/jira/browse/HBASE-20710
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver
>    Affects Versions: 2.0.1
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Minor
>             Fix For: 2.0.1
>
>
> The cpu profiling shows that during PE randomWrite testing, about 1 percent 
> of time is spent in cloneFamily. Reviewing code found that when a cell is DBB 
> backed ByteBuffKeyValueCell (which is default with Netty Rpc), 
> cell.getFamilyArray() will call cloneFamily() and there is again a 
> cloneFamily() in the following line of the code. since this is the critical 
> write path processing, this needs to be optimized.
> https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java#L791
> https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java#L795



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to