changeset 40785:875d2af8cb4e

mmapindex: move the 'mmapindexthreshold' option out of experimental The option is useful and should be advertised more. We move it out of experimental as a first step. The `storage` section is selected as this is related to how the storage is accessed. A new 'performance' section might be more appropriate. We move from 'mmapindexthreshold` to `mmap-threshold` as non-index item are also suitable for mmap (eg: the rev-branch-cache). If relevant, we can introduce sub-option `mmap-threshold.revlog-index` later.
author Boris Feld <boris.feld@octobus.net>
date Fri, 23 Nov 2018 06:07:33 +0100
parents a0f2641ddd61
children 74a9f428227e
files mercurial/configitems.py mercurial/localrepo.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Sat Dec 01 15:57:27 2018 +0100
+++ b/mercurial/configitems.py	Fri Nov 23 06:07:33 2018 +0100
@@ -544,9 +544,6 @@
 coreconfigitem('experimental', 'mergetempdirprefix',
     default=None,
 )
-coreconfigitem('experimental', 'mmapindexthreshold',
-    default=None,
-)
 coreconfigitem('experimental', 'narrow',
     default=False,
 )
@@ -978,6 +975,10 @@
 coreconfigitem('push', 'pushvars.server',
     default=False,
 )
+coreconfigitem('storage', 'mmap-threshold',
+    default=None,
+    alias=[('experimental', 'mmapindexthreshold')],
+)
 coreconfigitem('storage', 'new-repo-backend',
     default='revlogv1',
 )
--- a/mercurial/localrepo.py	Sat Dec 01 15:57:27 2018 +0100
+++ b/mercurial/localrepo.py	Fri Nov 23 06:07:33 2018 +0100
@@ -751,8 +751,7 @@
     if 0 <= chainspan:
         options[b'maxdeltachainspan'] = chainspan
 
-    mmapindexthreshold = ui.configbytes(b'experimental',
-                                        b'mmapindexthreshold')
+    mmapindexthreshold = ui.configbytes(b'storage', b'mmap-threshold')
     if mmapindexthreshold is not None:
         options[b'mmapindexthreshold'] = mmapindexthreshold