Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75706

Investigate a faster regex library to replace java.util.regex

XMLWordPrintable

      Explored Alternatives:

      • jregex: We have successfuly replaced java.util.regex with jregex in BFA for better performance. However, jregex has been abandoned since the early 2000s, and seems to be much slower with multi line pattern. Based on some performance testing this seems to be up to 6 times faster to run than the current implementation.
      • re2j: Offers high performance but lacks compatibility with features like backreferences and lookbehind. Implementation caused errors in our test environment.
        • We attempted a fallback mechanism to switch to java.util.regex when unsupported patterns are detected. This approach broke multiple unit tests and introduced complexity, so we ended up not implementing this solution.
      • joni: Another option evaluated. This requires significant changes due to lower-level implementation and missing methods comparing to the standard java.util.regex. Lacks necessary regex feature support.{}

      Conclusion:
      Further investigation is needed to find a viable solution.

            t_westling Tomas Westling
            maiordac Matias
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: