From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-353420-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QVQTr-0005he-VR
	for garchives@archives.gentoo.org; Sat, 11 Jun 2011 15:52:12 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 8B2971C018;
	Sat, 11 Jun 2011 15:52:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 5743C1C018
	for <gentoo-commits@lists.gentoo.org>; Sat, 11 Jun 2011 15:52:03 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C2C5E1B402D
	for <gentoo-commits@lists.gentoo.org>; Sat, 11 Jun 2011 15:52:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 217718003C
	for <gentoo-commits@lists.gentoo.org>; Sat, 11 Jun 2011 15:52:02 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <da1556b818de2829fc72700a15a12424ccf32f16.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
X-VCS-Repository: proj/portage
X-VCS-Files: pym/_emerge/depgraph.py
X-VCS-Directories: pym/_emerge/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: da1556b818de2829fc72700a15a12424ccf32f16
Date: Sat, 11 Jun 2011 15:52:02 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: ad3cfc1ffe3d69c21a0d5ab3f954cb33

commit:     da1556b818de2829fc72700a15a12424ccf32f16
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 15:51:24 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 15:51:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3Dda1556b8

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.

---
 pym/_emerge/depgraph.py |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 854fa63..37dde2d 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 =3D [node for node in asap_nodes \
 					if mygraph.contains(node)]
-				for node in asap_nodes:
-					if not mygraph.child_nodes(node,
-						ignore_priority=3Dpriority_range.ignore_soft):
-						selected_nodes =3D [node]
-						asap_nodes.remove(node)
+				for i in range(priority_range.SOFT,
+					priority_range.MEDIUM_SOFT + 1):
+					ignore_priority =3D priority_range.ignore_priority[i]
+					for node in asap_nodes:
+						if not mygraph.child_nodes(node,
+							ignore_priority=3Dignore_priority):
+							selected_nodes =3D [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,