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

Avoid repeated flattening of nested ConsStrings

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs
    • None
    • b22
    • generic
    • generic

    Backports

      Description

        Currently, when a ConsString is flattened to a java.lang.String, only the top level string is generated and cached (for obvious reasons). However, if a ConsString is repeatedly concatenated with another string and then flattened we may want to generate and cache the java.lang.String representation of that partial ConsString.

        A typical use case is the following piece of code where `data` may be a constant, long ConsString.

            String(header + CRLF + data);

        Attachments

          Issue Links

            Activity

              People

                hannesw Hannes Wallnoefer
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: