CLDR Ticket #9738(accepted tools)
Speed up RegexLookup
|Reported by:||mark||Owned by:||emmons|
Looking at the RegexTree code, I think it could be much faster.
Currently, it does a regex match on a bunch of prefixes as it descends.
Instead, process each of the items in the input list for the lookup.
For each, get the constant prefix: the longest initial string that doesn't contain any (non-literal) regex syntax or %. For example:
has the constant prefix
You can then build a data structure that uses these prefixes to pre-filter the lookup, avoiding a bunch of regex matches.
- Status changed from new to accepted
- Component changed from unknown to other
- Priority changed from assess to medium
- Milestone changed from UNSCH to 31
- Owner changed from anybody to emmons
- Type changed from unknown to tools