diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-26 01:16:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-26 01:16:33 -0700 |
commit | 3949ec4cc0af288e5eaac15d9a6d7723e103bac2 (patch) | |
tree | 924e55ee8da28715c7c85d56f9e99167a711b7a4 | |
parent | 0859f81c690b5d99dcd60a1f5cca5df65ab3c5d7 (diff) | |
download | portage-3949ec4cc0af288e5eaac15d9a6d7723e103bac2.tar.gz portage-3949ec4cc0af288e5eaac15d9a6d7723e103bac2.tar.bz2 portage-3949ec4cc0af288e5eaac15d9a6d7723e103bac2.zip |
If more than 20 file collisions occur, only look up the first 20 since
get_owners is slow for large numbers of files.
-rw-r--r-- | pym/portage/dbapi/vartree.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 5953997f3..24588fb2e 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3747,6 +3747,10 @@ class dblink(object): msg.append("") eerror(msg) + if len(collisions) > 20: + # get_owners is slow for large numbers of files, so + # don't look them all up. + collisions = collisions[:20] owners = self.vartree.dbapi._owners.get_owners(collisions) self.vartree.dbapi.flush_cache() |