Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 42046:4ee906aa7b60
compression: introduce an official `format.revlog-compression` option
This option supersedes the `experiment.format.compression` option. The value
currently supported are zlib (default) and zstd (if Mercurial was compiled with
zstd support).
The option gained an explicit reference to `revlog` since this is the target
usage here. Different storage methods might require different compression
strategies.
In our tests, using zstd give a significant CPU usage improvement (both
compression and decompressing) while keeping similar repository size.
Zstd as other interresting mode (dictionnary, pre-text, etc?) that are probably
worth exploring. However, just plain switching from zlib to zstd provide a large
benefit.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 Mar 2019 18:26:54 +0100 |
parents | bb271ec2fbfb |
children | 8de1b5a009ee |
comparison
equal
deleted
inserted
replaced
42045:d7e751ec679e | 42046:4ee906aa7b60 |
---|---|
2918 if ui.configbool('format', 'usefncache'): | 2918 if ui.configbool('format', 'usefncache'): |
2919 requirements.add('fncache') | 2919 requirements.add('fncache') |
2920 if ui.configbool('format', 'dotencode'): | 2920 if ui.configbool('format', 'dotencode'): |
2921 requirements.add('dotencode') | 2921 requirements.add('dotencode') |
2922 | 2922 |
2923 compengine = ui.config('experimental', 'format.compression') | 2923 compengine = ui.config('format', 'revlog-compression') |
2924 if compengine not in util.compengines: | 2924 if compengine not in util.compengines: |
2925 raise error.Abort(_('compression engine %s defined by ' | 2925 raise error.Abort(_('compression engine %s defined by ' |
2926 'experimental.format.compression not available') % | 2926 'format.revlog-compression not available') % |
2927 compengine, | 2927 compengine, |
2928 hint=_('run "hg debuginstall" to list available ' | 2928 hint=_('run "hg debuginstall" to list available ' |
2929 'compression engines')) | 2929 'compression engines')) |
2930 | 2930 |
2931 # zlib is the historical default and doesn't need an explicit requirement. | 2931 # zlib is the historical default and doesn't need an explicit requirement. |