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

Performance regression in Regex

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      generic
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        Recent Unicode upgrade to 12.1 caused performance regression in regex.
        It is reported that the build has slowed a bit, seems to be spending a lot of time in the grapheme support looking for boundaries
        ```java.lang.Thread.State: RUNNABLE
            at java.util.regex.Grapheme.getType(java.base/Grapheme.java:168)
            at java.util.regex.Grapheme.nextBoundary(java.base/Grapheme.java:73)
            at java.util.regex.Pattern$NFCCharProperty.match(java.base/Pattern.java:3971)
            at java.util.regex.Pattern$Curly.match0(java.base/Pattern.java:4380)
            at java.util.regex.Pattern$Curly.match(java.base/Pattern.java:4354)
            at java.util.regex.Pattern$GroupHead.match(java.base/Pattern.java:4779)
            at java.util.regex.Pattern$Branch.match(java.base/Pattern.java:4724)
            at java.util.regex.Pattern$GroupHead.match(java.base/Pattern.java:4779)
            at java.util.regex.Pattern$CharPropertyGreedy.match(java.base/Pattern.java:4281)
            at java.util.regex.Pattern$Begin.match(java.base/Pattern.java:3672)
            at java.util.regex.Matcher.match(java.base/Matcher.java:1756)
            at java.util.regex.Matcher.matches(java.base/Matcher.java:713)
            at sun.nio.fs.UnixFileSystem$3.matches(java.base/UnixFileSystem.java:308)
            at jdk.tools.jmod.JmodTask$JmodFileWriter.matches(jdk.jlink/JmodTask.java:808)
            at jdk.tools.jmod.JmodTask$JmodFileWriter$3.visitFile(jdk.jlink/JmodTask.java:788)
            at jdk.tools.jmod.JmodTask$JmodFileWriter$3.visitFile(jdk.jlink/JmodTask.java:777)
            at java.nio.file.Files.walkFileTree(java.base/Files.java:2803)
            at jdk.tools.jmod.JmodTask$JmodFileWriter.processSection(jdk.jlink/JmodTask.java:776)
            at jdk.tools.jmod.JmodTask$JmodFileWriter.processClasses(jdk.jlink/JmodTask.java:752)
            at jdk.tools.jmod.JmodTask$JmodFileWriter.write(jdk.jlink/JmodTask.java:484)
            at jdk.tools.jmod.JmodTask.create(jdk.jlink/JmodTask.java:438)
            at jdk.tools.jmod.JmodTask.run(jdk.jlink/JmodTask.java:208)
            at jdk.tools.jmod.Main.main(jdk.jlink/Main.java:34)```

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  redestad Claes Redestad
                  Reporter:
                  naoto Naoto Sato
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: