OrderedGrep re-compiles regex every line
Brought to you by:
ben-spiller,
moraygrieve
The implementation of assert ordered grep has a list of expressions, when it finds a match it pops an item off the list. Each time around the loop over lines in the file the top of the list is recompiled as an expression.
Instead there should be a mapping of strings to compiled excpressions at the top of the method
Yes re-compiling regex per line is not ideal. Will be fixed in upcoming 1.4.0 https://github.com/pysys-test/pysys-test/commit/559a420583dc669633574336eb3b3a96c48a6777