A lot of performance remains to be gained, most notably by doing more things
in parallel, but also by caching, not falling back to Python but switching
to another regex engine, etc..
I have measured on multiple repositories that this change, when in combination
with the next two patches, improve bare hg status performance, and has no
observable impact when falling back (because it does so early).
On the Netbeans repository:
Mozilla Central with the one pattern that causes a fallback removed:
Rust+C: 1.700 s