hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-10656) Optimize conversion of byte arrays back to path string
Date Tue, 19 Jul 2016 22:57:20 GMT
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

To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org

View raw message