Rev 5999: (spiv) Make Branch.open more than 3x faster. (Andrew Bennetts) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jun 28 17:19:54 UTC 2011


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

------------------------------------------------------------
revno: 5999 [merge]
revision-id: pqm at pqm.ubuntu.com-20110628171951-sl08uaay9phmndbt
parent: pqm at pqm.ubuntu.com-20110628164123-0v7nmesxgd8tojbr
parent: andrew.bennetts at canonical.com-20110628152832-xtqkm8phvvvgckaj
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2011-06-28 17:19:51 +0000
message:
  (spiv) Make Branch.open more than 3x faster. (Andrew Bennetts)
modified:
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2011-06-20 11:04:42 +0000
+++ b/bzrlib/branch.py	2011-06-28 15:09:53 +0000
@@ -2942,7 +2942,11 @@
         # you can always ask for the URL; but you might not be able to use it
         # if the repo can't support stacking.
         ## self._check_stackable_repo()
-        stacked_url = self._get_config_location('stacked_on_location')
+        # stacked_on_location is only ever defined in branch.conf, so don't
+        # waste effort reading the whole stack of config files.
+        config = self.get_config()._get_branch_data_config()
+        stacked_url = self._get_config_location('stacked_on_location',
+            config=config)
         if stacked_url is None:
             raise errors.NotStacked(self)
         return stacked_url

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-06-28 16:41:23 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-06-28 17:19:51 +0000
@@ -26,6 +26,9 @@
 .. Improvements to existing commands, especially improved performance 
    or memory usage, or better results.
 
+* ``Branch.open`` is now about 3x faster (about 2ms instead of 6.5ms).
+  (Andrew Bennetts).
+
 Bug Fixes
 *********
 




More information about the bazaar-commits mailing list