[ 
https://issues.apache.org/jira/browse/HDDS-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-2445:
---------------------------------
    Labels: perfomance pull-request-available  (was: perfomance)

> Replace ToStringBuilder in BlockData
> ------------------------------------
>
>                 Key: HDDS-2445
>                 URL: https://issues.apache.org/jira/browse/HDDS-2445
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Minor
>              Labels: perfomance, pull-request-available
>         Attachments: blockdata.png, setchunks.png
>
>
> {{BlockData#toString}} uses {{ToStringBuilder}} for ease of implementation.  
> This has a few problems:
> # {{ToStringBuilder}} uses {{StringBuffer}}, which is synchronized
> # the default buffer is 512 bytes, more than needed here
> # {{BlockID}} and {{ContainerBlockID}} both use another {{StringBuilder}} or 
> {{StringBuffer}} for their {{toString}} implementation, leading to several 
> allocations and copies
> The flame graph shows that {{BlockData#toString}} may be responsible for 1.5% 
> of total allocations while putting keys.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to