From 8e0a9da5f4202b794f082f4a97c5cc2a6de0101a Mon Sep 17 00:00:00 2001 From: Park Ju Hyung Date: Sat, 31 Oct 2020 19:15:24 +0900 Subject: ui: Pass the exact CPU thread count to -j Once the number of jobs exceeds the total CPU thread count, the task scheduler starts to inflict excessive context switches, slowing the entire operation down. Change-Id: Iff8829f3932e3ceb5eb78151b616991187a27246 Signed-off-by: Park Ju Hyung --- ui/build/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/build/config.go b/ui/build/config.go index 7f28d3af5..7f55fe360 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -102,7 +102,7 @@ func NewConfig(ctx Context, args ...string) Config { } // Sane default matching ninja - ret.parallel = runtime.NumCPU() + 2 + ret.parallel = runtime.NumCPU() ret.keepGoing = 1 ret.totalRAM = detectTotalRAM(ctx) -- cgit v1.2.3