[PATCH 16 of 18] configitems: register the 'worker.backgroundcloseminfilecount' config

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jul 2 18:25:33 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1498787159 -7200
#      Fri Jun 30 03:45:59 2017 +0200
# Node ID 65909c3e69051008c933e548c6e12a760517559e
# Parent  738344bfccade4f9b339ed54fc599523ef66dc71
# EXP-Topic config.register.worker
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 65909c3e6905
configitems: register the 'worker.backgroundcloseminfilecount' config

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -119,3 +119,6 @@ coreconfigitem('ui', 'quiet',
 coreconfigitem('worker', 'backgroundclosemaxqueue',
     default=384,
 )
+coreconfigitem('worker', 'backgroundcloseminfilecount',
+    default=2048,
+)
diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -541,8 +541,7 @@ class backgroundfilecloser(object):
         # There is overhead to starting and stopping the background threads.
         # Don't do background processing unless the file count is large enough
         # to justify it.
-        minfilecount = ui.configint('worker', 'backgroundcloseminfilecount',
-                                    2048)
+        minfilecount = ui.configint('worker', 'backgroundcloseminfilecount')
         # FUTURE dynamically start background threads after minfilecount closes.
         # (We don't currently have any callers that don't know their file count)
         if expectedcount > 0 and expectedcount < minfilecount:


More information about the Mercurial-devel mailing list