Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 19 Mar 2019 16:20:02 +0300] rev 42006
branchcache: add attributes to track which nodes are verified
Half of the cost of loading branchcache comes from verifiying all the nodes it
has. We don't need to verify all the nodes in all the cases. Sometimes we need
to verify only a set of nodes for a set of branches. We can ignore nodes of
other branches as we are not going to read them.
This patch introduces two attributes to branchcache class. _verifiedbranches is
a set which will tell the branches for which it's head nodes are verified.
_closedverified is a boolean which will tell whether all closednodes are
verified or not.
Another idea which I had was to keep a set of nodes which are verified, but it
will be more ugly and difficult to track things on node level.
Differential Revision: https://phab.mercurial-scm.org/D6156
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 18 Mar 2019 19:44:55 +0300] rev 42005
branchcache: make entries a private attribute
Differential Revision: https://phab.mercurial-scm.org/D6155
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 18 Mar 2019 19:31:45 +0300] rev 42004
branchcache: introduce hasbranch()
This will be used to check whether a branch exists or not. This will optimized
in future.
Differential Revision: https://phab.mercurial-scm.org/D6154
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 18 Mar 2019 19:11:55 +0300] rev 42003
branchmap: drop branchcache.setdefault() (API)
All the callers are updated to call setdefault of branchcache.entries
Differential Revision: https://phab.mercurial-scm.org/D6153