From 460883dd2f8741dfe8130a9e9c4e6ef9dc365b71 Mon Sep 17 00:00:00 2001 From: ryanhamley Date: Tue, 16 Oct 2018 14:59:40 -0700 Subject: [PATCH 1/2] Limit the number of workers that can be spawned --- src/util/worker_pool.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/worker_pool.js b/src/util/worker_pool.js index 53730b5c187..a67f43e90d2 100644 --- a/src/util/worker_pool.js +++ b/src/util/worker_pool.js @@ -43,4 +43,5 @@ export default class WorkerPool { } } -WorkerPool.workerCount = Math.max(Math.floor(browser.hardwareConcurrency / 2), 1); +const availableLogicalProcessors = Math.floor(browser.hardwareConcurrency / 2); +WorkerPool.workerCount = Math.max(Math.min(availableLogicalProcessors, 4), 1); From 2f9c5d05cf8588f414d0b15a54fad936030ce2d1 Mon Sep 17 00:00:00 2001 From: ryanhamley Date: Wed, 17 Oct 2018 16:48:09 -0700 Subject: [PATCH 2/2] Up max number of workers to 6 --- src/util/worker_pool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/worker_pool.js b/src/util/worker_pool.js index a67f43e90d2..734f886e23a 100644 --- a/src/util/worker_pool.js +++ b/src/util/worker_pool.js @@ -44,4 +44,4 @@ export default class WorkerPool { } const availableLogicalProcessors = Math.floor(browser.hardwareConcurrency / 2); -WorkerPool.workerCount = Math.max(Math.min(availableLogicalProcessors, 4), 1); +WorkerPool.workerCount = Math.max(Math.min(availableLogicalProcessors, 6), 1);