New recipe up on the docs site covering how to switch from Apache ORO to Java’s built-in regex engine:
TL;DR — Add this.regex = { engine: "java" }; to your Application.cfc (available since 5.3.8.79).
Apache ORO was retired in 2010. Java’s java.util.regex is faster, actively maintained, and gives you modern features like look-behinds, named groups, and possessive quantifiers.
It’s not a drop-in swap though — the recipe covers the main gotchas:
.no longer matches newlines by default (add(?s))- Backreferences in replacements change from
\1to$1 $in replacement strings becomes special- ORO-only stuff like
\u/\U...\Ecase modification has no equivalent - Curly braces are stricter
We switched the docs build itself over and saw GC parallel phases drop from 244k to 66k and a ~10% build time improvement, mainly from eliminating all the per-call ORO object allocations.
