1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00

getdeps: use half as many jobs by default on windows

Summary:
This takes some pressure off both cpu and memory
on a laptop.

Reviewed By: pkaush

Differential Revision: D20562474

fbshipit-source-id: a058c71c47f25c3a2b3c1e34a0d0caf83e642021
This commit is contained in:
Wez Furlong
2020-03-26 06:54:07 -07:00
committed by Facebook GitHub Bot
parent d61c5c4816
commit 10e147d53c

View File

@@ -83,6 +83,14 @@ class BuildOptions(object):
import multiprocessing
num_jobs = multiprocessing.cpu_count()
if is_windows():
# On Windows the cpu count tends to be the HT count.
# Running with that level of concurrency tends to
# swamp the system and make hard to perform other
# light work. Let's halve the number of cores here
# to win that back. The user can still specify a
# larger number if desired.
num_jobs = int(num_jobs / 2)
if not install_dir:
install_dir = os.path.join(scratch_dir, "installed")