At http://bzr.arbash-meinel.com/branches/bzr/1.10-dev/builder_iter_entries

------------------------------------------------------------
revno: 3849
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: builder_iter_entries
timestamp: Tue 2008-11-25 12:29:54 -0600
message:
  Rather than skipping the difference_update entirely, just restrict it to the 
intersection keys.
=== modified file 'bzrlib/btree_index.py'
--- a/bzrlib/btree_index.py     2008-11-24 21:28:32 +0000
+++ b/bzrlib/btree_index.py     2008-11-25 18:29:54 +0000
@@ -431,21 +431,19 @@
             efficient order for the index (keys iteration order in this case).
         """
         keys = set(keys)
+        local_keys = keys.intersection(self._keys)
         if self.reference_lists:
-            for key in keys.intersection(self._keys):
+            for key in local_keys:
                 node = self._nodes[key]
                 yield self, key, node[1], node[0]
         else:
-            for key in keys.intersection(self._keys):
+            for key in local_keys:
                 node = self._nodes[key]
                 yield self, key, node[1]
-        if not self._backing_indices:
-            return
         # Find things that are in backing indices that have not been handled
         # yet.
-        # It turns out this difference_update can be a significant portion of
-        # time when branching from a stacked branch to a standalone one.
-        keys.difference_update(self._keys)
+        # Remove all of the keys that we found locally
+        keys.difference_update(local_keys)
         for backing in self._backing_indices:
             if backing is None:
                 continue

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to