Rev 3912: Shave a little bit of time by using itervalues() rather than casting through refs() in http://bazaar.launchpad.net/%7Ebzr/bzr/brisbane-core
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 26 19:13:59 GMT 2009
At http://bazaar.launchpad.net/%7Ebzr/bzr/brisbane-core
------------------------------------------------------------
revno: 3912
revision-id: john at arbash-meinel.com-20090326191304-w52buxewrxumpgvo
parent: john at arbash-meinel.com-20090326180307-yktd7ny3mees1v6t
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: brisbane-core
timestamp: Thu 2009-03-26 14:13:04 -0500
message:
Shave a little bit of time by using itervalues() rather than casting through refs()
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py 2009-03-26 18:03:07 +0000
+++ b/bzrlib/chk_map.py 2009-03-26 19:13:04 +0000
@@ -1441,7 +1441,10 @@
# nodes).
# small.difference_update(large) scales O(large), but
# small.difference(large) scales O(small).
- chks = set(node.refs()).difference(all_uninteresting_chks)
+ # Also, we know we just _deserialised this node, so we can
+ # access the dict directly.
+ chks = set(node._items.itervalues()).difference(
+ all_uninteresting_chks)
# Is set() and .difference_update better than:
# chks = [chk for chk in node.refs()
# if chk not in all_uninteresting_chks]
More information about the bazaar-commits
mailing list