File tree Expand file tree Collapse file tree 2 files changed +12
-24
lines changed
utils/update_checkout/update_checkout Expand file tree Collapse file tree 2 files changed +12
-24
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def __init__(
4848 ):
4949 self ._monitor_polling_period = 0.1
5050 if n_processes == 0 :
51- n_processes = ParallelRunner . _max_processes ()
51+ n_processes = cpu_count () * 2
5252 self ._terminal_width = shutil .get_terminal_size ().columns
5353 self ._n_processes = n_processes
5454 self ._pool_args = pool_args
@@ -140,13 +140,3 @@ def check_results(results, op) -> int:
140140 if r .stderr :
141141 print (r .stderr .decode ())
142142 return fail_count
143-
144- @staticmethod
145- def _max_processes () -> int :
146- if sys .version_info .minor < 10 :
147- # On Python < 3.10, https://bugs.python.org/issue46391 causes
148- # Pool.map and its variants to hang. Limiting the number of
149- # processes fixes the issue.
150- return int (cpu_count () * 1.25 )
151- else :
152- return cpu_count () * 2
Original file line number Diff line number Diff line change @@ -809,20 +809,18 @@ def main():
809809 sys .exit (1 )
810810
811811 if is_unix_sock_path_too_long ():
812- print (
813- f"TEMPDIR={ tempfile .gettempdir ()} is too long and multiprocessing "
814- "sockets will exceed the size limit. Falling back to verbose mode."
815- )
812+ if not args .dump_hashes and not args .dump_hashes_config :
813+ # Do not print anything other than the json dump.
814+ print (
815+ f"TEMPDIR={ tempfile .gettempdir ()} is too long and multiprocessing "
816+ "sockets will exceed the size limit. Falling back to verbose mode."
817+ )
818+ args .verbose = True
819+ if sys .version_info .minor < 10 :
820+ if not args .dump_hashes and not args .dump_hashes_config :
821+ # Do not print anything other than the json dump.
822+ print ("Falling back to verbose mode due to a Python 3.9 limitation." )
816823 args .verbose = True
817- elif (
818- sys .version_info .minor < 10
819- and args .n_processes > ParallelRunner ._max_processes ()
820- ):
821- print (
822- "Falling back to verbose mode due to a Python 3.9 limitation. "
823- f"Lower `-j` below { ParallelRunner ._max_processes ()} to use non verbose mode."
824- )
825- args ._verbose = True
826824
827825 clone = args .clone
828826 clone_with_ssh = args .clone_with_ssh
You can’t perform that action at this time.
0 commit comments