summaryrefslogtreecommitdiffstats
path: root/pym/portage/repository
diff options
context:
space:
mode:
authorBrian Harring <ferringb@chromium.org>2011-10-14 02:40:00 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-14 16:50:20 -0700
commit1e8870bd45a4e2a9c43e7f112701c6ae84b0fd56 (patch)
tree7111ded6176c5a8f4a2b5a39bad04b2f560608ea /pym/portage/repository
parent2ed1cb53cc4158af08c22d466b15b9a9a7767212 (diff)
downloadportage-1e8870bd45a4e2a9c43e7f112701c6ae84b0fd56.tar.gz
portage-1e8870bd45a4e2a9c43e7f112701c6ae84b0fd56.tar.bz2
portage-1e8870bd45a4e2a9c43e7f112701c6ae84b0fd56.zip
layout.conf: add git friendly pregenerated cache format
Enabled via cache-format = md5-dict This format is essentially just flat_hash, using md5 rather than mtime, and dropping the path component from _eclasses_ entries. From a speed standpoint, the md5 overhead is ~16% in comparison to mtime, timed on a modern sandybridge; specifically, validating 29k nodes takes ~8.8s for flat_md5, while the pms norm is ~7.7s. That said, the cache is /usable/ in places PMS is not; in those cases, it can definitely be a win since even if the cache is partially old, it's better than regenerating everything from scratch. (cherry picked from commit 95ddf97e2f7e7d3f6a072604b2df5f77e9298558) Change-Id: Ic3561369b7a8be7f86480f339ab1686fddea6dff
Diffstat (limited to 'pym/portage/repository')
-rw-r--r--pym/portage/repository/config.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index a67e7f138..cf268f825 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -136,9 +136,13 @@ class RepoConfig(object):
format = 'pms'
if format == 'pms':
from portage.cache.metadata import database
+ name = 'metadata/cache'
+ elif format == 'md5-dict':
+ from portage.cache.flat_hash import md5_database as database
+ name = 'metadata/md5-cache'
else:
return None
- return database(self.location, 'metadata/cache',
+ return database(self.location, name,
auxdbkeys, readonly=readonly)
def load_manifest(self, *args, **kwds):