mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
obsolete: stop doing membership test on list
According to the Surgeon General, computer should not use list for membership testing because of the risk of being slow.
This commit is contained in:
parent
d5a4643492
commit
f1f6dad830
@ -267,7 +267,8 @@ class obsstore(object):
|
||||
Return the number of new marker."""
|
||||
if not _enabled:
|
||||
raise util.Abort('obsolete feature is not enabled on this repo')
|
||||
new = [m for m in markers if m not in self._all]
|
||||
known = set(self._all)
|
||||
new = [m for m in markers if m not in known]
|
||||
if new:
|
||||
f = self.sopener('obsstore', 'ab')
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user