[Pkg-bazaar-commits] ./bzr/unstable r928: - go back to using plain builtin set()
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:29 UTC 2009
------------------------------------------------------------
revno: 928
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Sun 2005-07-17 15:27:05 -0300
message:
- go back to using plain builtin set()
modified:
bzrlib/weave.py
-------------- next part --------------
=== modified file 'bzrlib/weave.py'
--- a/bzrlib/weave.py 2005-07-17 18:06:53 +0000
+++ b/bzrlib/weave.py 2005-07-17 18:27:05 +0000
@@ -21,6 +21,10 @@
"""Weave - storage of related text file versions"""
+# before intset (r923) 2000 versions in 41.5s
+# with intset (r926) 2000 versions in 93s !!!
+# better to just use plain sets.
+
# TODO: Perhaps have copy method for Weave instances?
# XXX: If we do weaves this way, will a merge still behave the same
@@ -56,9 +60,6 @@
-from bzrlib.intset import IntSet
-
-
class WeaveError(Exception):
"""Exception in processing weave"""
@@ -235,7 +236,7 @@
def inclusions(self, versions):
"""Return set of all ancestors of given version(s)."""
- i = IntSet(versions)
+ i = set(versions)
v = max(versions)
try:
while v >= 0:
@@ -258,7 +259,7 @@
li.sort(reverse=True)
mininc = []
- gotit = IntSet()
+ gotit = set()
for pv in li:
if pv not in gotit:
@@ -274,7 +275,7 @@
if parents:
self._v.append(parents)
else:
- self._v.append(IntSet())
+ self._v.append(set())
def _check_lines(self, text):
@@ -318,7 +319,7 @@
"""
istack = []
- dset = IntSet()
+ dset = set()
lineno = 0 # line of weave, 0-based
@@ -358,7 +359,7 @@
included = self.inclusions(versions)
istack = []
- dset = IntSet()
+ dset = set()
lineno = 0 # line of weave, 0-based
More information about the Pkg-bazaar-commits
mailing list