hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-9935) Slight perf improvement: Avoid KeyValue.getRowLength() at some places
Date Sun, 10 Nov 2013 23:23:17 GMT

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

Lars Hofhansl commented on HBASE-9935:
--------------------------------------

I tried a big'ish patch. Didn't see any improvements. The JVM is probably smart enough to
do the right thing anyway. Unless somebody has some new ideas, I'll close this as invalid
(or maybe just remove the keyLenght caching).


> 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
>
> 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)

Mime
View raw message