sparse-read: target density of 50% instead of 25%
authorPaul Morelle <paul.morelle@octobus.net>
Fri, 22 Jun 2018 17:12:24 +0200
changeset 38632 eb8504715071
parent 38631 9ef10437bb88
child 38633 e3d18de56417
sparse-read: target density of 50% instead of 25% The target density value is wrong. The default target chain span is 4*text-length. However, the target max chain payload is 2*text-length. So default target density should be 50% (2/4) not 25% (1/4).
mercurial/configitems.py
mercurial/revlog.py
--- a/mercurial/configitems.py	Fri Jul 06 00:39:21 2018 +0530
+++ b/mercurial/configitems.py	Fri Jun 22 17:12:24 2018 +0200
@@ -594,7 +594,7 @@
     default=False,
 )
 coreconfigitem('experimental', 'sparse-read.density-threshold',
-    default=0.25,
+    default=0.50,
 )
 coreconfigitem('experimental', 'sparse-read.min-gap-size',
     default='256K',
--- a/mercurial/revlog.py	Fri Jul 06 00:39:21 2018 +0530
+++ b/mercurial/revlog.py	Fri Jun 22 17:12:24 2018 +0200
@@ -625,7 +625,7 @@
         self._compengine = 'zlib'
         self._maxdeltachainspan = -1
         self._withsparseread = False
-        self._srdensitythreshold = 0.25
+        self._srdensitythreshold = 0.50
         self._srmingapsize = 262144
 
         mmapindexthreshold = None