Rev 4403: A comment about rewriting _find_gdfo in http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads
John Arbash Meinel
john at arbash-meinel.com
Thu Jun 11 23:18:17 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads
------------------------------------------------------------
revno: 4403
revision-id: john at arbash-meinel.com-20090611221804-xbsmslillnb6tldf
parent: john at arbash-meinel.com-20090611210918-mk52ural4dbxteax
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-better_heads
timestamp: Thu 2009-06-11 17:18:04 -0500
message:
A comment about rewriting _find_gdfo
-------------- next part --------------
=== modified file 'bzrlib/_known_graph_pyx.pyx'
--- a/bzrlib/_known_graph_pyx.pyx 2009-06-11 21:09:18 +0000
+++ b/bzrlib/_known_graph_pyx.pyx 2009-06-11 22:18:04 +0000
@@ -292,6 +292,13 @@
cdef _KnownGraphNode child_node
cdef _KnownGraphNode parent_node
+ # TODO: Look into rewriting this to not use a heap, but instead to just
+ # walk all children until you get to one that is missing a parent
+ # that avoids the heap overhead and finding the tails, at the
+ # cost of generally hitting nodes more than 1 time (once in the
+ # iter-dict, and then a second time when finding children,
+ # possibly a third when there is more than one parent)
+
tails = self._find_tails()
todo = []
for pos from 0 <= pos < PyList_GET_SIZE(tails):
More information about the bazaar-commits
mailing list