Skip to content

Commit

Permalink
HPCC-31921 Add caching of regex compiled search patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
dcamper committed Jun 11, 2024
1 parent ea34e27 commit da6cb86
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 94 deletions.
2 changes: 1 addition & 1 deletion ecl/hql/hqlfold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ IHqlExpression * foldConstantOperator(IHqlExpression * expr, unsigned foldOption
StringBuffer pattern, search;
v0->getUTF8Value(pattern);
v1->getUTF8Value(search);
ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern, !expr->hasAttribute(noCaseAtom));
ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern.length(), pattern, !expr->hasAttribute(noCaseAtom));
compiled->getMatchSet(isAllResult, resultBytes, matchResults.refdata(), search.lengthUtf8(), search.str());
rtlDestroyCompiledU8StrRegExpr(compiled);
}
Expand Down
Loading

0 comments on commit da6cb86

Please sign in to comment.