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 475F4200B66 for ; Wed, 3 Aug 2016 18:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 43F38160A5D; Wed, 3 Aug 2016 16:53:22 +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 B8368160A86 for ; Wed, 3 Aug 2016 18:53:21 +0200 (CEST) Received: (qmail 52451 invoked by uid 500); 3 Aug 2016 16:53:20 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 52339 invoked by uid 99); 3 Aug 2016 16:53:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 16:53:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AA9C42C0D5D for ; Wed, 3 Aug 2016 16:53:20 +0000 (UTC) Date: Wed, 3 Aug 2016 16:53:20 +0000 (UTC) From: "Kihwal Lee (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10656) Optimize conversion of byte arrays back to path string MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Aug 2016 16:53:22 -0000 [ https://issues.apache.org/jira/browse/HDFS-10656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15406204#comment-15406204 ] Kihwal Lee commented on HDFS-10656: ----------------------------------- It looks like existing test cases (e.g. TestPathComponents) are sufficient. +1 > Optimize conversion of byte arrays back to path string > ------------------------------------------------------ > > Key: HDFS-10656 > URL: https://issues.apache.org/jira/browse/HDFS-10656 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs > Reporter: Daryn Sharp > Assignee: Daryn Sharp > Attachments: HDFS-10656.patch > > > {{DFSUtil.byteArray2PathString}} generates excessive object allocation. > # each byte array is encoded to a string (copy) > # string appended to a builder which extracts the chars from the intermediate string (copy) and adds to its own char array > # builder's char array is re-alloced if over 16 chars (copy) > # builder's toString creates another string (copy) > Instead of allocating all these objects and performing multiple byte/char encoding/decoding conversions, the byte array can be built in-place with a single final conversion to a string. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org