# HG changeset patch # User Pierre-Yves David # Date 2017-06-30 01:45:59 # Node ID d19804c167101eaa39c0cb71156555081f3ae6b3 # Parent 5dcbd2045dcb7add5838533e261e97ce4aef7e46 configitems: register the 'worker.backgroundcloseminfilecount' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -158,3 +158,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: