-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optimize getMaxWorkers using os.availableParallelism (#1378)
Summary: Optimize the maximum number of worker parallelism using os.availableParallelism `os.cpus().length` returns the number of CPUs in the physical device, which is static. It should be replaced with the maximum number of computations the system can execute simultaneously. In Node.js, this is provided by `os.availableParallelism()`. Currently, Metro requires Node.js version 18.18 or higher, which includes `os.availableParallelism`. Changelog: [Internal] Pull Request resolved: #1378 Test Plan: Green CI Reviewed By: vzaidman Differential Revision: D65277683 Pulled By: robhogan fbshipit-source-id: 69c22a28626a89588082ca309dda6ebc9d08413a
- Loading branch information
1 parent
f2a130c
commit 5ae946d
Showing
3 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters