Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 37ba84a

Browse files
committed
⚡ limit multithreading to 7 extra threads
see #904
1 parent 048feb5 commit 37ba84a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_multithread.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ if (cluster.isMaster) {
44
const electron = require("electron");
55
const ipc = electron.ipcMain;
66
const signale = require("signale");
7-
const numCPUs = require("os").cpus().length - 1; // Leave a core available for the renderer process
7+
const osCPUs = require("os").cpus().length
8+
// See #904
9+
// Also, leave a core available for the renderer process
10+
const numCPUs = (osCPUs > 8) ? 7 : osCPUs;
811

912
const si = require("systeminformation");
1013

0 commit comments

Comments
 (0)