configitems: register the 'worker.backgroundcloseminfilecount' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:45:59 +0200
changeset 33231 d19804c16710
parent 33230 5dcbd2045dcb
child 33232 4531a967e7f1
configitems: register the 'worker.backgroundcloseminfilecount' config
mercurial/configitems.py
mercurial/vfs.py
--- a/mercurial/configitems.py	Fri Jun 30 03:45:58 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:45:59 2017 +0200
@@ -158,3 +158,6 @@
 coreconfigitem('worker', 'backgroundclosemaxqueue',
     default=384,
 )
+coreconfigitem('worker', 'backgroundcloseminfilecount',
+    default=2048,
+)
--- a/mercurial/vfs.py	Fri Jun 30 03:45:58 2017 +0200
+++ b/mercurial/vfs.py	Fri Jun 30 03:45:59 2017 +0200
@@ -541,8 +541,7 @@
         # 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: