Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A06121074E for ; Mon, 11 Nov 2013 21:22:18 +0000 (UTC) Received: (qmail 93492 invoked by uid 500); 11 Nov 2013 21:22:18 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 93454 invoked by uid 500); 11 Nov 2013 21:22:18 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 93445 invoked by uid 99); 11 Nov 2013 21:22:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 21:22:18 +0000 Date: Mon, 11 Nov 2013 21:22:18 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9935) Slight perf improvement: Avoid KeyValue.getRowLength() at some places MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-9935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13819408#comment-13819408 ] stack commented on HBASE-9935: ------------------------------ +1 on removing caching of a keylength that provides no discernible benefit (I probably added it after a 'profiling' session -- or at least added an ancestor of current KV length 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 > 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)