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 10:05:38 +0000 (03:05 -0700)
pym/_emerge/depgraph.py

index 6744d907268c90edae6052c8e6836179970806f7..5a7a98393bb3434d0b4284dcbad4358f5e67bebd 100644 (file)
@@ -4275,6 +4275,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