Mercurial > hg
comparison mercurial/localrepo.py @ 34881:8c9b08a0c48c
sparse-read: skip gaps too small to be worth splitting
Splitting at too small gaps might not be worthwhile. With this changeset,
we stop considering splitting on too small gaps. The threshold is configurable.
We arbitrarily pick 256K as a default value because it seems "okay".
Further testing on various repositories and setups will be needed to tune it.
The option name is 'experimental.sparse-read.min-gap-size`, and replaces
`experimental.sparse-read.min-block-size` which is not used any more.
author | Paul Morelle <paul.morelle@octobus.net> |
---|---|
date | Wed, 18 Oct 2017 09:07:48 +0200 |
parents | 4d5d5009bd75 |
children | 5c6b96b832c2 ebabc4a805c4 |
comparison
equal
deleted
inserted
replaced
34880:9e18ab7f7240 | 34881:8c9b08a0c48c |
---|---|
609 if mmapindexthreshold is not None: | 609 if mmapindexthreshold is not None: |
610 self.svfs.options['mmapindexthreshold'] = mmapindexthreshold | 610 self.svfs.options['mmapindexthreshold'] = mmapindexthreshold |
611 withsparseread = self.ui.configbool('experimental', 'sparse-read') | 611 withsparseread = self.ui.configbool('experimental', 'sparse-read') |
612 srdensitythres = float(self.ui.config('experimental', | 612 srdensitythres = float(self.ui.config('experimental', |
613 'sparse-read.density-threshold')) | 613 'sparse-read.density-threshold')) |
614 srminblocksize = self.ui.configbytes('experimental', | 614 srmingapsize = self.ui.configbytes('experimental', |
615 'sparse-read.min-block-size') | 615 'sparse-read.min-gap-size') |
616 self.svfs.options['with-sparse-read'] = withsparseread | 616 self.svfs.options['with-sparse-read'] = withsparseread |
617 self.svfs.options['sparse-read-density-threshold'] = srdensitythres | 617 self.svfs.options['sparse-read-density-threshold'] = srdensitythres |
618 self.svfs.options['sparse-read-min-block-size'] = srminblocksize | 618 self.svfs.options['sparse-read-min-gap-size'] = srmingapsize |
619 | 619 |
620 for r in self.requirements: | 620 for r in self.requirements: |
621 if r.startswith('exp-compression-'): | 621 if r.startswith('exp-compression-'): |
622 self.svfs.options['compengine'] = r[len('exp-compression-'):] | 622 self.svfs.options['compengine'] = r[len('exp-compression-'):] |
623 | 623 |