[Pkg-bazaar-commits] ./bzr/unstable r922: - optimization for Inventory.id2path; access byid map directly rather than

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:28 UTC 2009


------------------------------------------------------------
revno: 922
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-07-15 20:35:18 -0300
message:
  - optimization for Inventory.id2path; access byid map directly rather than 
    through the __getitem__ on the inventory; rather faster
modified:
  bzrlib/inventory.py
-------------- next part --------------
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2005-07-11 07:33:45 +0000
+++ b/bzrlib/inventory.py	2005-07-15 23:35:18 +0000
@@ -565,7 +565,7 @@
         """Return as a list the path to file_id."""
 
         # get all names, skipping root
-        p = [self[fid].name for fid in self.get_idpath(file_id)[1:]]
+        p = [self._byid[fid].name for fid in self.get_idpath(file_id)[1:]]
         return os.sep.join(p)
             
 



More information about the Pkg-bazaar-commits mailing list