From: Zac Medico Date: Wed, 16 Mar 2011 20:58:17 +0000 (-0700) Subject: iter_owners: try the hashed approach in any case X-Git-Tag: v2.2.0_alpha28~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=906f42f51dcb10b390732b91409059400c5fb609;p=portage.git iter_owners: try the hashed approach in any case Previously, the slow approach was used whenever more than 10 files were given as input. However, large numbers of files don't necessarily mean the hashed approach is a bad choice, so try it in any case. --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 32b4852bf..bf48b1508 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -954,15 +954,7 @@ class vardbapi(dbapi): if not isinstance(path_iter, list): path_iter = list(path_iter) - - if len(path_iter) > 10: - for x in self._iter_owners_low_mem(path_iter, - scheduler=scheduler): - yield x - return - owners_cache = self._populate(scheduler=scheduler) - vardb = self._vardb root = vardb._eroot hash_pkg = owners_cache._hash_pkg