diff --git a/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts b/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts index 0326f8455a6..e40a32dc8b9 100644 --- a/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts @@ -313,7 +313,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy { const data$ = combineLatest([ this.restrictedItemTypesService.restricted$, - this.cipherService.cipherViews$(userId), + this.cipherService.cipherListViews$(userId), ]).pipe( map(([restrictedTypes, ciphers]) => { const restrictedForUser = restrictedTypes diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index 1e7e5302d41..72c1ca40913 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -141,6 +141,8 @@ export class CipherService implements CipherServiceAbstraction { * Usage of the {@link CipherViewLike} type is recommended to ensure both `CipherView` and `CipherListView` are supported. */ cipherListViews$ = perUserCache$((userId: UserId) => { + let decryptStartTime: number; + return this.configService.getFeatureFlag$(FeatureFlag.PM22134SdkCipherListView).pipe( switchMap((useSdk) => { if (!useSdk) { @@ -158,11 +160,23 @@ export class CipherService implements CipherServiceAbstraction { (cipherData) => new Cipher(cipherData, localData?.[cipherData.id as CipherId]), ), ), + tap(() => { + decryptStartTime = performance.now(); + }), switchMap(async (ciphers) => { const [decrypted, failures] = await this.decryptCiphersWithSdk(ciphers, userId, false); await this.setFailedDecryptedCiphers(failures, userId); return decrypted; }), + tap((decrypted) => { + this.logService.measure( + decryptStartTime, + "Vault", + "CipherService", + "listView decrypt complete", + [["Items", decrypted.length]], + ); + }), ); }), );