Add CONTENTS indexing support for optimization of owner lookups. The
authorZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 13:55:06 +0000 (13:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 13:55:06 +0000 (13:55 -0000)
commit0c8fc90cb2f0101f60a78953668b391e44d3cdca
treee1420607f8c3ac05f28f7bb05714aa825566658f
parent105076fd745b6f93907d403aa768432395b71230
Add CONTENTS indexing support for optimization of owner lookups. The
vardbapi cache maintains a hash table (inside vdb_metadata.pickle)
that serves to index package contents by mapping the basename of file
to a list of possible packages that own it. This is used to optimize
owner lookups by narrowing the search down to a smaller number of
packages. It increases the size of vdb_metadata.pickle by approximately
30% and it's used in the following cases:

 * When an unexpected file collision occurs (whether
   or not collision-protect is enabled)

 * `emerge <filename>`

 * `portageq owners`

The

svn path=/main/trunk/; revision=10609
bin/portageq
pym/_emerge/__init__.py
pym/portage/dbapi/vartree.py