Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013395

StringBuffer.toString performance regression impacting embedded benchmarks

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: embedded
    • Subcomponent:
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b91

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dholmes David Holmes
                Reporter:
                bobv Bob Vandette
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: