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

Regexp literals are compiled twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 8
    • None
    • core-libs
    • None

      Currently Nashorn compiles each regexp literal twice, once to validate the expression and once to compile it. This is less of a problem with java.util.regex as it compiles pretty fast, but more so with Joni and especially Joni + ASM compilation.

      Two options are to either introduce a validate-only compile mode or to cache compiled expressions in the regexp factory.

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

              Created:
              Updated:
              Resolved: