Regexp literals are compiled twice

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 8
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: