Mercurial > hg
changeset 33231:d19804c16710
configitems: register the 'worker.backgroundcloseminfilecount' config
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:45:59 +0200 |
parents | 5dcbd2045dcb |
children | 4531a967e7f1 |
files | mercurial/configitems.py mercurial/vfs.py |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: