only run crypto worker on half of available threads
This commit is contained in:
parent
5a8d880ebd
commit
ddec9cf2fa
@ -203,6 +203,7 @@ export class CryptoApi {
|
||||
// only works in the browser
|
||||
// tslint:disable-next-line:no-string-literal
|
||||
concurrency = (navigator as any)["hardwareConcurrency"];
|
||||
concurrency = Math.max(1, Math.ceil(concurrency / 2));
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user