Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 33533:4133c0b0fcd7
cachevfs: add a vfs dedicated to cache
Most of the cache content lives in '.hg/cache/'. Moreover they are computed
exclusively from data in the '.hg/store' directory. This creates issues with
the share extension as the '.hg/store' directory is shared but the '.hg/cache'
is not. On large repositories, this makes this prevent some usage of the share
extension inefficient as some caches can take minutes to be recomputed.
To improve the situation, we introduce a new 'cachevfs' that will be dedicated
to cache reading and writing. In the next patches of this series, we'll
migrate the 4 existing caches to it and update the share extension.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 15 Jul 2017 23:05:04 +0200 |
parents | d645fdfb749f |
children | 54b36d3ff7f6 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Jul 15 22:40:51 2017 +0200 +++ b/mercurial/localrepo.py Sat Jul 15 23:05:04 2017 +0200 @@ -423,6 +423,8 @@ self.svfs = self.store.vfs self.sjoin = self.store.join self.vfs.createmode = self.store.createmode + self.cachevfs = vfsmod.vfs(self.vfs.join('cache')) + self.cachevfs.createmode = self.store.createmode if (self.ui.configbool('devel', 'all-warnings') or self.ui.configbool('devel', 'check-locks')): if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs