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>
Fri, 18 Mar 2011 19:46:59 +0000 (12:46 -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 217033593da3e206b1a15657939607b357a2fc59..ce94fa41802fd9aeac7c45b8223a8eab976e71eb 100644 (file)
@@ -953,15 +953,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