Description
A change in the implementation of the core libraries StringBuffer was made in 1.4.2 causing a significant regression in the StringBuffer.toString method. In 1.4.2 the underlying character array was shared between the String implementation and the StringBuffer backing array. This implementation detail reduced the overhead of creating the String array since the data did not need to be copied. There was a CR filed in 2005 (JDK-6219959) to address this issue but the developer working in this fix could not measure any benchmark that was impacted by this regression. The CR contains a suggested fix that was never implemented.
Embedded benchmarks used in evaluating CDC and SE Embedded are showing a significant performance difference due to this change in StringBuffer implementation.
Embedded benchmarks used in evaluating CDC and SE Embedded are showing a significant performance difference due to this change in StringBuffer implementation.
Attachments
Issue Links
- relates to
-
JDK-6219959 StringBuffer.toString() innefficient in 1.5.0
- Closed
-
JDK-8014814 (str) StringBuffer "null" is not appended
- Closed