diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-05-08 21:51:47 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-08 21:51:47 -0700 |
commit | a983fc1c83402dbfe0a423bf729c72eeb795388c (patch) | |
tree | f138333714f85912b11c4b16b254a962e24089db /pym/portage/dbapi/_MergeProcess.py | |
parent | 125430a3f2879e4bc497be212a91d9dd7194d261 (diff) | |
download | portage-a983fc1c83402dbfe0a423bf729c72eeb795388c.tar.gz portage-a983fc1c83402dbfe0a423bf729c72eeb795388c.tar.bz2 portage-a983fc1c83402dbfe0a423bf729c72eeb795388c.zip |
vardbapi: disable subprocess vdb cache updates
Since commit 7535cabdf2fab76fc55df83643157613dfd66be9,
vardbapi.flush_cache() is often called within subprocesses spawned
from MergeProcess. The _aux_cache_threshold doesn't work as designed
if the cache is flushed from a subprocess like this, can lead to the
vdb cache being flushed for every single merge. This is a waste of
disk IO, so disable vdb cache updates in subprocesses.
Diffstat (limited to 'pym/portage/dbapi/_MergeProcess.py')
-rw-r--r-- | pym/portage/dbapi/_MergeProcess.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index afb2e084d..12a0baf55 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -176,6 +176,9 @@ class MergeProcess(SpawnProcess): # is triggered when mylink._scheduler is None. mylink._scheduler = None + # Avoid wastful updates of the vdb cache. + self.vartree.dbapi._flush_cache_enabled = False + # In this subprocess we don't want PORTAGE_BACKGROUND to # suppress stdout/stderr output since they are pipes. We # also don't want to open PORTAGE_LOG_FILE, since it will |