From: Zac Medico Date: Tue, 18 Jul 2006 03:59:26 +0000 (-0000) Subject: Use a set instead of a list for better efficiency. X-Git-Tag: v2.1.1~208 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f606a6937edcf1db86050d6ae041245421676f3a;p=portage.git Use a set instead of a list for better efficiency. svn path=/main/trunk/; revision=3916 --- diff --git a/bin/emerge b/bin/emerge index 9fc2daba8..90ec7e435 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3234,7 +3234,7 @@ def action_depclean(settings, trees, ldpath_mtimes, print "!!! You have no dependencies. Impossible. Bug." sys.exit(1) - reallist=[] + reallist = set() explicitly_required = set() for x in alldeps: myparts=portage.catpkgsplit(string.split(x)[2]) @@ -3250,8 +3250,7 @@ def action_depclean(settings, trees, ldpath_mtimes, continue catpack=myparts[0]+"/"+myparts[1] - if catpack not in reallist: - reallist.append(catpack) + reallist.add(catpack) explicitly_required.add(x.split()[2])