Rev 6046: Discuss why the extra getattr() calls should be fine. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-get_cached_parent_map-388269

John Arbash Meinel john at arbash-meinel.com
Fri Aug 26 11:30:00 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.4-get_cached_parent_map-388269

------------------------------------------------------------
revno: 6046
revision-id: john at arbash-meinel.com-20110826112951-69npob6aoky0avmj
parent: john at arbash-meinel.com-20110826112629-ft6pgyb2r39t7ifq
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-get_cached_parent_map-388269
timestamp: Fri 2011-08-26 13:29:51 +0200
message:
  Discuss why the extra getattr() calls should be fine.
-------------- next part --------------
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py	2011-08-26 11:26:29 +0000
+++ b/bzrlib/graph.py	2011-08-26 11:29:51 +0000
@@ -96,8 +96,10 @@
         """
         found = {}
         remaining = set(keys)
-        # TODO: jam 20110826 This adds a getattr() call to each get_parent_map
-        #       call.  Performance test it.
+        # This adds getattr() overhead to each get_parent_map call. However,
+        # this is StackedParentsProvider, which means we're dealing with I/O
+        # (either local indexes, or remote RPCs), so CPU overhead should be
+        # minimal.
         for parents_provider in self._parent_providers:
             get_cached = getattr(parents_provider, 'get_cached_parent_map',
                                  None)



More information about the bazaar-commits mailing list