Show More
@@ -417,6 +417,9 b" coreconfigitem('experimental', 'sparse-r" | |||||
417 | coreconfigitem('experimental', 'sparse-read.density-threshold', |
|
417 | coreconfigitem('experimental', 'sparse-read.density-threshold', | |
418 | default=0.25, |
|
418 | default=0.25, | |
419 | ) |
|
419 | ) | |
|
420 | coreconfigitem('experimental', 'sparse-read.min-block-size', | |||
|
421 | default='256K', | |||
|
422 | ) | |||
420 | coreconfigitem('experimental', 'treemanifest', |
|
423 | coreconfigitem('experimental', 'treemanifest', | |
421 | default=False, |
|
424 | default=False, | |
422 | ) |
|
425 | ) |
@@ -611,8 +611,11 b' class localrepository(object):' | |||||
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', | |||
|
615 | 'sparse-read.min-block-size') | |||
614 | self.svfs.options['with-sparse-read'] = withsparseread |
|
616 | self.svfs.options['with-sparse-read'] = withsparseread | |
615 | 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 | |||
616 |
|
619 | |||
617 | for r in self.requirements: |
|
620 | for r in self.requirements: | |
618 | if r.startswith('exp-compression-'): |
|
621 | if r.startswith('exp-compression-'): |
@@ -180,7 +180,7 b' def _slicechunk(revlog, revs):' | |||||
180 | endbyte = start(revs[-1]) + length(revs[-1]) |
|
180 | endbyte = start(revs[-1]) + length(revs[-1]) | |
181 | deltachainspan = endbyte - startbyte |
|
181 | deltachainspan = endbyte - startbyte | |
182 |
|
182 | |||
183 | if len(revs) <= 1: |
|
183 | if deltachainspan <= revlog._srminblocksize or len(revs) <= 1: | |
184 | yield revs |
|
184 | yield revs | |
185 | continue |
|
185 | continue | |
186 |
|
186 | |||
@@ -360,6 +360,7 b' class revlog(object):' | |||||
360 | self._maxdeltachainspan = -1 |
|
360 | self._maxdeltachainspan = -1 | |
361 | self._withsparseread = False |
|
361 | self._withsparseread = False | |
362 | self._srdensitythreshold = 0.25 |
|
362 | self._srdensitythreshold = 0.25 | |
|
363 | self._srminblocksize = 262144 | |||
363 |
|
364 | |||
364 | mmapindexthreshold = None |
|
365 | mmapindexthreshold = None | |
365 | v = REVLOG_DEFAULT_VERSION |
|
366 | v = REVLOG_DEFAULT_VERSION | |
@@ -389,6 +390,8 b' class revlog(object):' | |||||
389 | self._withsparseread = bool(opts.get('with-sparse-read', False)) |
|
390 | self._withsparseread = bool(opts.get('with-sparse-read', False)) | |
390 | if 'sparse-read-density-threshold' in opts: |
|
391 | if 'sparse-read-density-threshold' in opts: | |
391 | self._srdensitythreshold = opts['sparse-read-density-threshold'] |
|
392 | self._srdensitythreshold = opts['sparse-read-density-threshold'] | |
|
393 | if 'sparse-read-min-block-size' in opts: | |||
|
394 | self._srminblocksize = opts['sparse-read-min-block-size'] | |||
392 |
|
395 | |||
393 | if self._chunkcachesize <= 0: |
|
396 | if self._chunkcachesize <= 0: | |
394 | raise RevlogError(_('revlog chunk cache size %r is not greater ' |
|
397 | raise RevlogError(_('revlog chunk cache size %r is not greater ' |
General Comments 0
You need to be logged in to leave comments.
Login now