Optimize uninstall selection more.
authorZac Medico <zmedico@gentoo.org>
Fri, 15 Oct 2010 02:10:02 +0000 (19:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 15 Oct 2010 02:10:02 +0000 (19:10 -0700)
pym/_emerge/depgraph.py

index adef1193d11928faf8974206520f50640d4c7d21..adabc97d4008e5e0c7492cb3d1ce4f16fc4d5fe5 100644 (file)
@@ -4321,6 +4321,11 @@ class depgraph(object):
                                                min_parent_deps = len(parent_deps)
                                                uninst_task = task
 
+                                       if uninst_task is not None and min_parent_deps == 1:
+                                               # This is the best possible result, so so abort search
+                                               # now in order avoid wasting any more cpu time.
+                                               break
+
                                if uninst_task is not None:
                                        # The uninstall is performed only after blocking
                                        # packages have been merged on top of it. File