The attached patch improves the execution speed of AbuseFilterParser::nextToken through a series of small changes.
The most significant impact comes from modifying the application of regex to focus on the immediate offset and not look downstream unnecessarily. It also stops radixRegex from giving empty string matches.
This patch preserves all current behavior and is transparent to the user.
Benchmarking done with function evaluation and variable lookup hacked off, saw a ~20% improvement in the parsing speed for rules after applying this patch.
Version: unspecified
Severity: enhancement