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

Lars Hofhansl updated HBASE-9935:
---------------------------------

    Attachment: 9935-0.94.txt

Here's a proposed patch. Two parts:
# remove keyLength caching in KeyValue and save 4 bytes on every KV.
# improves the ScanQueryMatcher code. In match() we carefully decode the 
KeyValue manually and then go back and call kv.getTimestamp() and kv.getType(), 
both of which do all the decoding again

The performance change is in the noise it seems. But it's good to save 4 bytes 
on a object that we are creating over and over.

> Slight perf improvement: Avoid KeyValue.getRowLength() at some places
> ---------------------------------------------------------------------
>
>                 Key: HBASE-9935
>                 URL: https://issues.apache.org/jira/browse/HBASE-9935
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Priority: Minor
>         Attachments: 9935-0.94.txt
>
>
> Here's an example:
> {code}
> KeyValue.createLastOnRow(
>           kv.getBuffer(), kv.getRowOffset(), kv.getRowLength(),
>           kv.getBuffer(), kv.getFamilyOffset(), kv.getFamilyLength(),
>            kv.getBuffer(), kv.getQualifierOffset(), kv.getQualifierLength());
> {code}
> Looks harmless enough, but that actually recalculates the rowlength 5 times. 
> And each time it needs to decode the rowlength again from the bytes of the KV.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to