branchcache: lazily validate nodes in iteritems()
This saves ~0.30 sec on creating a new branch on our internal repo.
Differential Revision: https://phab.mercurial-scm.org/D6236
--- a/mercurial/branchmap.py Tue Apr 16 15:01:33 2019 +0300
+++ b/mercurial/branchmap.py Mon Apr 15 19:21:41 2019 +0300
@@ -219,8 +219,9 @@
return key in self._entries
def iteritems(self):
- self._verifyall()
- return self._entries.iteritems()
+ for k, v in self._entries.iteritems():
+ self._verifybranch(k)
+ yield k, v
def hasbranch(self, label):
""" checks whether a branch of this name exists or not """