Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0BC06200BCE for ; Fri, 2 Dec 2016 20:50:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0A665160B27; Fri, 2 Dec 2016 19:50:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7A012160B08 for ; Fri, 2 Dec 2016 20:49:59 +0100 (CET) Received: (qmail 19588 invoked by uid 500); 2 Dec 2016 19:49:58 -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 19561 invoked by uid 99); 2 Dec 2016 19:49:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 19:49:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7697B2C2A68 for ; Fri, 2 Dec 2016 19:49:58 +0000 (UTC) Date: Fri, 2 Dec 2016 19:49:58 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17235) Improvement in creation of CIS for onheap buffer cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 19:50:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15716090#comment-15716090 ] stack commented on HBASE-17235: ------------------------------- +1 > Improvement in creation of CIS for onheap buffer cases > ------------------------------------------------------ > > Key: HBASE-17235 > URL: https://issues.apache.org/jira/browse/HBASE-17235 > Project: HBase > Issue Type: Improvement > Components: rpc > Affects Versions: 2.0.0 > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 2.0.0 > > Attachments: HBASE-17235.patch, HBASE-17235_1.patch > > > {code} > if (buf.hasArray()) { > cis = CodedInputStream.newInstance(buf.array(), offset, buf.limit()); > } else { > {code} > Currently we do this for onheap buffers incase there is no reservoir or the size is less than the minSizeforReservoir. I could see that even if reservoir is there there are requests which goes with the above way of creating CIS. This could be made efficient to avoid underlying copies by just doing this > {code} > cis = UnsafeByteOperations.unsafeWrap(buf.array(), offset, buf.limit()).newCodedInput(); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)