Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
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.
Attachments
Attachments
Issue Links
- links to