From: Zac Medico Date: Sun, 17 Dec 2006 10:17:54 +0000 (-0000) Subject: In depgraph.altlist(), pop as many leaf nodes as possible when no relationship has... X-Git-Tag: v2.1.2~284 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69b510521c04b5a743b725c13647bafc7d9315dc;p=portage.git In depgraph.altlist(), pop as many leaf nodes as possible when no relationship has been ignored. This can halve the time taken for a large merge order calculation. svn path=/main/trunk/; revision=5308 --- diff --git a/bin/emerge b/bin/emerge index 771e61a99..7bbd94d26 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1745,7 +1745,13 @@ class depgraph: selected_nodes = None if nodes: if ignore_priority <= DepPriority.SOFT: - selected_nodes = [nodes[0]] + if ignore_priority is None: + # Greedily pop all of these nodes since no relationship + # has been ignored. + selected_nodes = nodes + else: + # Only pop one node for optimal merge order. + selected_nodes = [nodes[0]] else: """Recursively gather a group of nodes that RDEPEND on eachother. This ensures that they are merged as a group