iter_owners: try the hashed approach in any case
authorZac Medico <zmedico@gentoo.org>
Wed, 16 Mar 2011 20:58:17 +0000 (13:58 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 16 Mar 2011 20:58:17 +0000 (13:58 -0700)
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.

pym/portage/dbapi/vartree.py

index 32b4852bfcbe8cdde05fbdaf636910f014572ed9..bf48b15081ed2a8928188548213d8c6632341ce1 100644 (file)
@@ -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