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

Use half of available CPUs

Summary: During intensive builds using all available cores tends to crash the machine. Cutting default number of jobs by half prevents that.

Reviewed By: wez

Differential Revision: D25027757

fbshipit-source-id: 5ea6c77fe4363b9ee09e50de1a5cc33281872e1d
This commit is contained in:
Koray Polat
2020-11-30 22:29:48 -08:00
committed by Facebook GitHub Bot
parent 1d87b1b5cd
commit 0041651bd0
2 changed files with 2 additions and 12 deletions

View File

@@ -288,9 +288,7 @@ def get_jobs_argument(num_jobs_arg: int) -> str:
return "-j" + str(num_jobs_arg)
import multiprocessing
num_jobs = multiprocessing.cpu_count()
if sys.platform == "win32":
num_jobs //= 2
num_jobs = multiprocessing.cpu_count() // 2
return "-j" + str(num_jobs)