1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Add sequentialize to prevent parralel loading of cipher keys (#7)

* Add sequentialize to prevent parralel loading of cipher keys

Massively improves start up performance of extensions

* Add tests for sequentialize

* Fix sequentialize as it was caching calls for all instances together

* Add sequentialize to the functions that have internal caches

* Adding sequentialize to getOrgKeys makes big performance difference

* Update cipher.service.ts

* Update collection.service.ts

* Update folder.service.ts
This commit is contained in:
Fred Cox
2018-07-23 21:23:30 +03:00
committed by Kyle Spearrin
parent 3a34d3b174
commit 04014a8e78
4 changed files with 197 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import { EncryptionType } from '../../enums/encryptionType';
import { CryptoService } from '../../abstractions/crypto.service';
import { sequentialize } from '../../misc/sequentialize';
import { Utils } from '../../misc/utils';
export class CipherString {
@@ -89,6 +90,7 @@ export class CipherString {
}
}
@sequentialize((args) => args[0])
async decrypt(orgId: string): Promise<string> {
if (this.decryptedValue) {
return Promise.resolve(this.decryptedValue);