File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
utils/update_checkout/update_checkout Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ def __init__(
4646 pool_args : List [Union [RunnerArguments , AdditionalSwiftSourcesArguments ]],
4747 n_processes : int = 0 ,
4848 ):
49- self ._monitor_polling_period = 0.1
5049 if n_processes == 0 :
51- n_processes = cpu_count () * 2
52- self ._terminal_width = shutil .get_terminal_size ().columns
50+ # Limit the number of processes as the performance regresses after
51+ # if the number is too high.
52+ n_processes = min (cpu_count () * 2 , 16 )
5353 self ._n_processes = n_processes
54+ self ._monitor_polling_period = 0.1
55+ self ._terminal_width = shutil .get_terminal_size ().columns
5456 self ._pool_args = pool_args
5557 self ._fn = fn
5658 self ._pool = Pool (processes = self ._n_processes )
You can’t perform that action at this time.
0 commit comments