Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 34678:e8a89ed7ce96
dirstate: move the _dirfoldmap to dirstatemap
Now that dirstatemap is the source of truth for the list of directories, let's
move _dirfoldmap on to it.
This pattern of moving cached variables onto the dirstate map makes it easier to
invalidate them, as seen by how the cache invalidation functions are slowly
shrinking to just be recreating the dirstatemap instance.
Differential Revision: https://phab.mercurial-scm.org/D983
author | Durham Goode <durham@fb.com> |
---|---|
date | Thu, 05 Oct 2017 11:34:41 -0700 |
parents | 014bd2a555c8 |
children | acdc574cb8d7 |
line wrap: on
line diff
--- a/contrib/perf.py Thu Oct 05 11:34:41 2017 -0700 +++ b/contrib/perf.py Thu Oct 05 11:34:41 2017 -0700 @@ -560,8 +560,8 @@ dirstate = repo.dirstate 'a' in dirstate def d(): - dirstate._dirfoldmap.get('a') - del dirstate._dirfoldmap + dirstate._map.dirfoldmap.get('a') + del dirstate._map.dirfoldmap del dirstate._map.dirs timer(d) fm.end()