I'm not sure of anything specific, but you can of course browse or
download the Railo source code and have a look yourself. :)
Query of query code starts here:
https://github.com/getrailo/railo/blob/master/railo-java/railo-core/src/railo/runtime/tag/Query.java#L445
Seems to just pass it straight to HSQL, so unless that uses it, I
suspect that's a red-herring.
Have you already checked/ruled out if this is simply a single badly
performing regex?
It is possible for some seemingly innocent patterns to cause
exponentially bad performance, so if you can narrow down any of that
time to one or more refind/rematch/rereplace calls then feel free to
post the regex and see if it can be improved.
> and reason for perl5matcher vs using a native java regex call?
Compatibility with ACF.
(In fact, I suspect it's ultimately backwards compatibility with CF5,
which wasn't Java-based.)
If the regex engine was simply switched, any rereplace calls with
backreferences would break, because the native java regex
(java.util.regex/JUR) uses $1 instead of \1 for backreferences.
Also, Apache ORO supports \u,\l,\U,\L,\E constructs (which allow
uppercasing/lowercasing of specific characters/text) and JUR doesn't
support those (nor even $u equivalents), so that's another issue.
If you're in a position to fork your code and experiment, I have
created a set of functions that wrap JUR (and provide some extra
functionality besides), which you can setup in Railo as if they were
built-in functions. (I haven't packaged as a Railo Extension, but
installation is just copying a few files.) Anyway, if you're
interested, see cfregex.net
Unfortunately you can't just do a drop-in replacement, since I also
took the opportunity to make the API more consistent/useful than the
one CF provides, but if it's not a specific regex problem, or you want
some of the improvements JUR allows (atomic grouping and possessive
quantifiers are useful for improving performance), then it might be
worth trying out.