From 3949ec4cc0af288e5eaac15d9a6d7723e103bac2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 26 Jul 2010 01:16:33 -0700 Subject: [PATCH] If more than 20 file collisions occur, only look up the first 20 since get_owners is slow for large numbers of files. --- pym/portage/dbapi/vartree.py | 4 ++++ 1 file changed, 4 insertions(+) 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() -- 2.26.2