Rev 2680: Fix remaining performance discrepancy with regular repositories. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Thu Jul 26 06:34:02 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2680
revision-id: robertc at robertcollins.net-20070726053359-39020zzniljsan17
parent: robertc at robertcollins.net-20070726052933-8uflqpri7n5lba0c
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Thu 2007-07-26 15:33:59 +1000
message:
  Fix remaining performance discrepancy with regular repositories.
modified:
  bzrlib/index.py                index.py-20070712131115-lolkarso50vjr64s-1
=== modified file 'bzrlib/index.py'
--- a/bzrlib/index.py	2007-07-18 06:16:21 +0000
+++ b/bzrlib/index.py	2007-07-26 05:33:59 +0000
@@ -238,6 +238,7 @@
                 self._nodes[key] = (value, tuple(node_refs))
             else:
                 self._nodes[key] = value
+        self._keys = set(self._nodes)
         if trailers != 1:
             # there must be one line - the empty trailer line.
             raise errors.BadIndexData(self)
@@ -285,7 +286,7 @@
             return
         if self._nodes is None:
             self._buffer_all()
-        keys = keys.intersection(self._nodes)
+        keys = keys.intersection(self._keys)
         if self.node_ref_lists:
             for key in keys:
                 value, node_refs = self._nodes[key]



More information about the bazaar-commits mailing list