From: Zac Medico Date: Sat, 11 Jun 2011 15:51:24 +0000 (-0700) Subject: serialize_tasks: asap ignore medium_soft earlier X-Git-Tag: v2.2.0_alpha40~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=da1556b818de2829fc72700a15a12424ccf32f16;p=portage.git serialize_tasks: asap ignore medium_soft earlier This allows us to avoid the less efficient runtime cycle pathway for cases in which an asap node is a leaf if medium_soft deps are ignored. Ths should increase efficiency without changing behavior. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 854fa63fb..37dde2d81 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4940,12 +4940,18 @@ class depgraph(object): # the parent to have been removed from the graph already. asap_nodes = [node for node in asap_nodes \ if mygraph.contains(node)] - for node in asap_nodes: - if not mygraph.child_nodes(node, - ignore_priority=priority_range.ignore_soft): - selected_nodes = [node] - asap_nodes.remove(node) + for i in range(priority_range.SOFT, + priority_range.MEDIUM_SOFT + 1): + ignore_priority = priority_range.ignore_priority[i] + for node in asap_nodes: + if not mygraph.child_nodes(node, + ignore_priority=ignore_priority): + selected_nodes = [node] + asap_nodes.remove(node) + break + if selected_nodes: break + if not selected_nodes and \ not (prefer_asap and asap_nodes): for i in range(priority_range.NONE,