Mercurial > hg
comparison mercurial/configitems.py @ 34824:e2ad93bcc084
revlog: introduce an experimental flag to slice chunks reads when too sparse
Delta chains can become quite sparse if there is a lot of unrelated data between
relevant pieces. Right now, revlog always reads all the necessary data for the
delta chain in one single read. This can lead to a lot of unrelated data to be
read (see issue5482 for more details).
One can use the `experimental.maxdeltachainspan` option with a large value
(or -1) to easily produce a very sparse delta chain.
This change introduces the ability to slice the chunks retrieval into multiple
reads, skipping large sections of unrelated data. Preliminary testing shows
interesting results. For example the peak memory consumption to read a manifest
on a large repository is reduced from 600MB to 250MB (200MB without
maxdeltachainspan). However, the slicing itself and the multiple reads can have
an negative impact on performance. This is why the new feature is hidden behind
an experimental flag.
Future changesets will add various parameters to control the slicing heuristics.
We hope to experiment a wide variety of repositories during 4.4 and hopefully
turn the feature on by default in 4.5.
As a first try, the algorithm itself is prone to deep changes. However, we wish
to define APIs and have a baseline to work on.
author | Paul Morelle <paul.morelle@octobus.net> |
---|---|
date | Tue, 10 Oct 2017 17:50:27 +0200 |
parents | c4a0480d1951 |
children | 4d5d5009bd75 |
comparison
equal
deleted
inserted
replaced
34823:7891d243d821 | 34824:e2ad93bcc084 |
---|---|
409 default=None, | 409 default=None, |
410 ) | 410 ) |
411 coreconfigitem('experimental', 'spacemovesdown', | 411 coreconfigitem('experimental', 'spacemovesdown', |
412 default=False, | 412 default=False, |
413 ) | 413 ) |
414 coreconfigitem('experimental', 'sparse-read', | |
415 default=False, | |
416 ) | |
417 coreconfigitem('experimental', 'sparse-read.density-threshold', | |
418 default=0.25, | |
419 ) | |
414 coreconfigitem('experimental', 'treemanifest', | 420 coreconfigitem('experimental', 'treemanifest', |
415 default=False, | 421 default=False, |
416 ) | 422 ) |
417 coreconfigitem('extensions', '.*', | 423 coreconfigitem('extensions', '.*', |
418 default=None, | 424 default=None, |