fix: cpu concurrency detection on some platforms#3255
Conversation
`os.availableParallelism()` should produce more accurate results of how much parallelism should be used then `os.cpus().length`. The only breaking change is the newer API requires node versions >= v18.x which is fine as node-gyp only aims to support latest and LTS releases. And the oldest LTS release still supported as of this commit is v22. Fixes nodejs#3191
|
Are there docs that explain how the CPU count will change on Android? |
|
No, no straightforward docs, but this should give you an explaination.
Looking at source tree of Node.js:
So on newer Android versions I believe that the docs specifying that If you want I can include these details in the commit message as well (I didn't as I thought it would make the commit message bit too long) |
os.availableParallelism()should produce more accurate results of howmuch parallelism should be used then
os.cpus().length. The onlybreaking change is the newer API requires node versions >= v18.x which
is fine as node-gyp only aims to support latest and LTS releases. And
the oldest LTS release still supported as of this commit is v22.
Fixes #3191
This should improve Android support.
Checklist
npm install && npm run lint && npm testpassesDescription of change