# HG changeset patch # User Pulkit Goyal # Date 1555345301 -10800 # Node ID f0203c3406e7729338d504fe144da90a61ad3b56 # Parent 75e8e16ca1075f402276c2a09586ff7e35e62273 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 diff -r 75e8e16ca107 -r f0203c3406e7 mercurial/branchmap.py --- 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 """