diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-17 10:17:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-17 10:17:54 +0000 |
commit | 69b510521c04b5a743b725c13647bafc7d9315dc (patch) | |
tree | 51256e60d4eeea59096badec63dde61ae61a5f28 | |
parent | ba4a92258ef8bdc8d1cd1c8f28ca6688849db592 (diff) | |
download | portage-69b510521c04b5a743b725c13647bafc7d9315dc.tar.gz portage-69b510521c04b5a743b725c13647bafc7d9315dc.tar.bz2 portage-69b510521c04b5a743b725c13647bafc7d9315dc.zip |
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
-rwxr-xr-x | bin/emerge | 8 |
1 files changed, 7 insertions, 1 deletions
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 |