Submitter | Yuya Nishihara |
---|---|
Date | March 13, 2017, 6:59 p.m. |
Message ID | <802478258f49c11e5248.1489431544@mimosa> |
Download | mbox | patch |
Permalink | /patch/19291/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/smartset.py b/mercurial/smartset.py --- a/mercurial/smartset.py +++ b/mercurial/smartset.py @@ -818,15 +818,15 @@ class generatorset(abstractsmartset): # Getting rid of it would provide an about 15% speed up on this # iteration. genlist = self._genlist - nextrev = self._consumegen().next - _len = len # cache global lookup + nextgen = self._consumegen() + _len, _next = len, next # cache global lookup def gen(): i = 0 while True: if i < _len(genlist): yield genlist[i] else: - yield nextrev() + yield _next(nextgen) i += 1 return gen()