Rev 5401: (spiv) Avoid repeatedly calling self.target.all_file_ids() in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Sep 1 09:02:45 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5401 [merge]
revision-id: pqm at pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
parent: pqm at pqm.ubuntu.com-20100901064557-qsxmjmp195ozbluf
parent: andrew.bennetts at canonical.com-20100831071218-4kjieu3ejqcdmdom
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-09-01 09:02:42 +0100
message:
  (spiv) Avoid repeatedly calling self.target.all_file_ids() in
   InterTree.iter_changes. (Andrew Bennetts)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
  doc/en/whats-new/whats-new-in-2.3.txt whatsnewin2.3.txt-20100818072501-x2h25r7jbnknvy30-1
=== modified file 'NEWS'
--- a/NEWS	2010-09-01 06:45:57 +0000
+++ b/NEWS	2010-09-01 08:02:42 +0000
@@ -155,6 +155,10 @@
   will be backed up (adding an extention of the form .~#~).
   (Marius Kruger, #400554)
 
+* ``bzr revert`` and ``bzr status`` are up to 15% faster on large trees
+  with many changes by not repeatedly building a list of all file-ids.
+  (Andrew Bennetts)
+
 * Decrease memory consumption when many chk index pages are loaded. (Such
   as during ``bzr co`` or ``bzr ls -R`` of a large tree.) Often we need to
   read many chk pages because the individual chk map nodes will be spread

=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py	2010-05-25 17:27:52 +0000
+++ b/bzrlib/tree.py	2010-08-31 07:12:18 +0000
@@ -1130,7 +1130,7 @@
             if file_id in to_paths:
                 # already returned
                 continue
-            if file_id not in self.target.all_file_ids():
+            if not self.target.has_id(file_id):
                 # common case - paths we have not emitted are not present in
                 # target.
                 to_path = None

=== modified file 'doc/en/whats-new/whats-new-in-2.3.txt'
--- a/doc/en/whats-new/whats-new-in-2.3.txt	2010-08-23 18:59:22 +0000
+++ b/doc/en/whats-new/whats-new-in-2.3.txt	2010-08-31 07:12:18 +0000
@@ -8,12 +8,12 @@
 :doc:`../release-notes/index` for a full list.
 
 Users are encouraged to upgrade from the other stable series.  This
-document outlines the improvements in Bazaar 2.2 vs Bazaar 2.1. As well as
+document outlines the improvements in Bazaar 2.3 vs Bazaar 2.2. As well as
 summarizing improvements made to the core product, it highlights
 enhancements within the broader Bazaar world of potential interest to
 those upgrading.
 
-Bazaar 2.2.0 is fully compatible both locally and on the network with 2.0
+Bazaar 2.3.0 is fully compatible both locally and on the network with 2.0
 2.1, and 2.2, and can read and write repositories generated by all
 previous versions.
 
@@ -28,6 +28,10 @@
 Performance improvements
 ************************
 
+* ``bzr revert`` and ``bzr status`` are up to 15% faster on large trees
+  with many changes by not repeatedly building a list of all file-ids.
+  (Andrew Bennetts)
+
 * ``bzr send`` uses less memory.  
   (John Arbash Meinel, #614576)
 




More information about the bazaar-commits mailing list