Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 23255:76effa770ff9
revlog: add config variable for limiting delta-chain length
The current heuristic for deciding between storing delta and full texts
is based on ratio of (sizeofdeltas)/(sizeoffulltext).
In some cases (for example a manifest for ahuge repo) this approach
can result in extremely long delta chains (~30,000) which are very slow to
read. (In the case of a manifest ~500ms are added to every hg command because of that).
This commit introduces "revlog.maxchainlength" configuration variable that will
limit delta chain length.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 06 Nov 2014 14:20:05 -0800 |
parents | 2d54aa5397cd |
children | 1c11393d5dfb |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Nov 06 14:08:25 2014 -0800 +++ b/mercurial/localrepo.py Thu Nov 06 14:20:05 2014 -0800 @@ -316,6 +316,9 @@ chunkcachesize = self.ui.configint('format', 'chunkcachesize') if chunkcachesize is not None: self.sopener.options['chunkcachesize'] = chunkcachesize + maxchainlen = self.ui.configint('revlog', 'maxchainlen') + if maxchainlen is not None: + self.sopener.options['maxchainlen'] = maxchainlen def _writerequirements(self): reqfile = self.opener("requires", "w")