Inside find_all_packages(), move the unique_array() call out of the loop.
authorzmedico <zmedico@gentoo.org>
Wed, 7 Jan 2009 10:46:21 +0000 (10:46 -0000)
committerzmedico <zmedico@gentoo.org>
Wed, 7 Jan 2009 10:46:21 +0000 (10:46 -0000)
This makes a big performance difference. Thanks to DJ Anderson for reporting.

svn path=/; revision=536

trunk/src/gentoolkit/helpers.py

index 1823f2cf1421156b17ed41b988819f533eacd966..4652b2d345a70b9fc23a6d38d597bfe257ded32d 100644 (file)
@@ -130,7 +130,7 @@ def find_all_packages(prefilter=None):
        for x in t:
                t2 += porttree.dbapi.cp_list(x)
                t2 += vartree.dbapi.cp_list(x)
-               t2 = unique_array(t2)
+       t2 = unique_array(t2)
        return [Package(x) for x in t2]
 
 def split_package_name(name):