changeset 26212:0d8df1f510c6

revset: uncache filteredset.__contains__ Since 96b6b3d78697, condition function returns a cached value, so there's little benefit to cache __contains__. No measurable difference found in contrib/base-revsets.txt.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 05 Sep 2015 12:56:53 +0900
parents ea489d94e1dc
children 4d6cdea33f37
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Sat Aug 22 17:08:37 2015 -0700
+++ b/mercurial/revset.py	Sat Sep 05 12:56:53 2015 +0900
@@ -3077,14 +3077,9 @@
         """
         self._subset = subset
         self._condition = condition
-        self._cache = {}
 
     def __contains__(self, x):
-        c = self._cache
-        if x not in c:
-            v = c[x] = x in self._subset and self._condition(x)
-            return v
-        return c[x]
+        return x in self._subset and self._condition(x)
 
     def __iter__(self):
         return self._iterfilter(self._subset)