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

Applying String::align and String::indent at Compile Time

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: P3
    • Resolution: Future Project
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Raw String Literals introduce a performance penalty for those developers indenting string bodies to align with surrounding code. This incidental indentation increases the space needed for the string in the class file and incurs a cost to remove the indentation at runtime, usually via String::align. To compensate, this feature reflectively applies select String methods at compile time, so that 1) minimum space is used to represent the string in the class file and 2) zero runtime cost occurs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jlaskey Jim Laskey
                Reporter:
                jlaskey Jim Laskey
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: