Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid chrome webworker OOM bug; closes #124
chrome (and chromium-based browsers) can OOM when: * the OS is Windows, MacOS, or Android (but not Linux?) * the website is hosted on a remote IP (not localhost) * webworkers are used to read files unfortunately this also applies to Android, which heavily relies on webworkers to make read-speeds anywhere close to acceptable as for android, there are diminishing returns with more than 4 webworkers (1=1x, 2=2.3x, 3=3.8x, 4=4.2x, 6=4.5x, 8=5.3x), and limiting the number of workers to ensure at least one idle core appears to sufficiently reduce the OOM probability on desktop, webworkers are only necessary for hashwasm, so limit the number of workers to 2 if crypto.subtle is available and otherwise use the nproc-1 rule for hashwasm in workers bug report: https://issues.chromium.org/issues/383568268
- Loading branch information