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 7F66A200B49 for ; Wed, 20 Jul 2016 00:57:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7E18F160A76; Tue, 19 Jul 2016 22:57: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 EB035160A8C for ; Wed, 20 Jul 2016 00:57:21 +0200 (CEST) Received: (qmail 53690 invoked by uid 500); 19 Jul 2016 22:57:20 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 53294 invoked by uid 99); 19 Jul 2016 22:57:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 22:57:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7FDF52C0D59 for ; Tue, 19 Jul 2016 22:57:20 +0000 (UTC) Date: Tue, 19 Jul 2016 22:57:20 +0000 (UTC) From: "Daryn Sharp (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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: Tue, 19 Jul 2016 22:57:22 -0000 Daryn Sharp created HDFS-10656: ---------------------------------- Summary: 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 {{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-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org