From: zmedico Date: Wed, 7 Jan 2009 10:46:21 +0000 (-0000) Subject: Inside find_all_packages(), move the unique_array() call out of the loop. X-Git-Tag: gentoolkit-0.2.4.3^2~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c81210556e7f72dd3175a0acf385c9959c1b9c52;p=gentoolkit.git Inside find_all_packages(), move the unique_array() call out of the loop. This makes a big performance difference. Thanks to DJ Anderson for reporting. svn path=/; revision=536 --- diff --git a/trunk/src/gentoolkit/helpers.py b/trunk/src/gentoolkit/helpers.py index 1823f2c..4652b2d 100644 --- a/trunk/src/gentoolkit/helpers.py +++ b/trunk/src/gentoolkit/helpers.py @@ -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):