This is an archive of the discontinued Mercurial Phabricator instance.

fsmonitor: use nonnormalset from dirstatemap
ClosedPublic

Authored by quark on Oct 18 2017, 6:42 PM.

Details

Summary

dirstate._nonnormalset has been moved to dirstate._map.nonnormalset by
60927b19ed65 (dirstate: move nonnormal and otherparent sets to dirstatemap)
and is guaranteed to be existed.

Let's update fsmonitor code to use the new nonnormalset. Thix fixed a perf
regression that slows down hg status by 0.5 seconds in one of our
production repos.

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

quark created this revision.Oct 18 2017, 6:42 PM
quark edited the summary of this revision. (Show Details)Oct 18 2017, 6:44 PM
wez added a subscriber: wez.Oct 18 2017, 6:53 PM
wez added inline comments.
hgext/fsmonitor/__init__.py
416

ah, I think we do need to keep this code path for the fresh instance case, otherwise we won't know how to resync with the world

quark added inline comments.Oct 18 2017, 6:55 PM
hgext/fsmonitor/__init__.py
416

Ah, sorry. Will update.

wez added inline comments.Oct 18 2017, 6:55 PM
hgext/fsmonitor/__init__.py
420

... so we should probably restore this logic, but can perhaps optimize some of these elements in here because we now know that fresh_instance will always be true in this path

quark updated this revision to Diff 3012.Oct 18 2017, 6:56 PM
quark updated this revision to Diff 3013.Oct 18 2017, 6:59 PM
quark marked 3 inline comments as done.Oct 18 2017, 6:59 PM
quark updated this revision to Diff 3014.Oct 18 2017, 7:06 PM
wez accepted this revision.Oct 18 2017, 8:42 PM

lgtm

durin42 accepted this revision.Oct 19 2017, 10:57 AM
This revision is now accepted and ready to land.Oct 19 2017, 10:57 AM
This revision was automatically updated to reflect the committed changes.