This is an archive of the discontinued Mercurial Phabricator instance.

rust-filepatterns: match exact `rootglob`s with a `HashSet`, not in the regex
ClosedPublic

Authored by Alphare on May 6 2020, 9:11 AM.

Details

Summary

This optimization yields some very interesting results in rootglob-heavy
repositories.

I build a test repository of the following structure:

root
    /<uuid>/build/empty_file
    ... repeat for 4000 entries

and a .hgignore containing the corresponding 4000 rootglob entries pointing
to all build/ folders.

Rust+c hg status goes from 350ms down to 110ms.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.May 6 2020, 9:11 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.