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 B377110FB6 for ; Sat, 22 Mar 2014 10:28:48 +0000 (UTC) Received: (qmail 35365 invoked by uid 500); 22 Mar 2014 10:28:46 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 35075 invoked by uid 500); 22 Mar 2014 10:28:45 -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 35041 invoked by uid 99); 22 Mar 2014 10:28:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2014 10:28:42 +0000 Date: Sat, 22 Mar 2014 10:28:42 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10805) Speed up KeyValueHeap.next() a bit 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-10805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943993#comment-13943993 ] Hudson commented on HBASE-10805: -------------------------------- FAILURE: Integrated in HBase-TRUNK #5033 (See [https://builds.apache.org/job/HBase-TRUNK/5033/]) HBASE-10805 Speed up KeyValueHeap.next() a bit (larsh: rev 1580149) * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java > Speed up KeyValueHeap.next() a bit > ---------------------------------- > > Key: HBASE-10805 > URL: https://issues.apache.org/jira/browse/HBASE-10805 > Project: HBase > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: Lars Hofhansl > Fix For: 0.99.0, 0.94.19, 0.98.2, 0.96.3 > > Attachments: 10805-trunk.txt > > > See discussion on HBASE-9969. > This was brought up by [~mcorgan]. Even though I didn't believe him first. > {code} > KeyValueScanner topScanner = this.heap.peek(); > if (topScanner == null || > this.comparator.compare(kvNext, topScanner.peek()) >= 0) { > this.heap.add(this.current); > this.current = pollRealKV(); > } > {code} > We already have the invariant everywhere this.current always has a real KV polled. So adding current back to the heap followed by pollRealKV() is a no-op if this.current is the only scanner anyway. > This can be changed to: > {code} > ... > if (topScanner != null && > this.comparator.compare(kvNext, topScanner.peek()) >= 0) { > ... > {code} > With 20m rows, 5 cols each, everything in the cache, fully compacted - i.e. one HFile per store, a scan that filters everything at the server through all 100m KVs takes 15.1s without the change and 13.3s with it, so a 12% improvement. -- This message was sent by Atlassian JIRA (v6.2#6252)