Mercurial > public > mercurial-scm > hg
comparison mercurial/upgrade.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 | d7e751ec679e |
children | 10a6725dca6e |
comparison
equal
deleted
inserted
replaced
42045:d7e751ec679e | 42046:4ee906aa7b60 |
---|---|
330 return req.split('-', 2)[2] | 330 return req.split('-', 2)[2] |
331 return 'zlib' | 331 return 'zlib' |
332 | 332 |
333 @classmethod | 333 @classmethod |
334 def fromconfig(cls, repo): | 334 def fromconfig(cls, repo): |
335 return repo.ui.config('experimental', 'format.compression') | 335 return repo.ui.config('format', 'revlog-compression') |
336 | 336 |
337 @registerformatvariant | 337 @registerformatvariant |
338 class compressionlevel(formatvariant): | 338 class compressionlevel(formatvariant): |
339 name = 'compression-level' | 339 name = 'compression-level' |
340 default = 'default' | 340 default = 'default' |