1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

[PM-24143] Search performance improvements (#16070)

* [PM-24143] Add perUserCache$ to SearchService index$

* [PM-24143] Cleanup and optimize isSearchable

* [PM-24143] Remove unused search flags and subscription from the vault-items component

* [PM-24143] Add search text for desktop vault items. Consolidate SearchTextDebounceInterval constant to SearchService

* [PM-24143] Ensure cipher search indexing is non-blocking

* [PM-24143] Remove redundant index ciphers operation

* [PM-24143] Add search performance measurements

* [PM-24143] Remove artificial delay

* [PM-24143] Remove startWith from index$ to avoid basic search with lunr queries

* [PM-24143] Re-organize isSearchable to check long lunr queries for index existence
This commit is contained in:
Shane Melton
2025-08-22 09:32:36 -07:00
committed by GitHub
parent ba7e5fdcde
commit 4676a122da
8 changed files with 147 additions and 46 deletions

View File

@@ -183,8 +183,7 @@ export class CipherService implements CipherServiceAbstraction {
]).pipe(
filter(([ciphers, _, keys]) => ciphers != null && keys != null), // Skip if ciphers haven't been loaded yor synced yet
switchMap(() => this.getAllDecrypted(userId)),
tap(async (decrypted) => {
await this.searchService.indexCiphers(userId, decrypted);
tap(() => {
this.messageSender.send("updateOverlayCiphers");
}),
);
@@ -216,7 +215,7 @@ export class CipherService implements CipherServiceAbstraction {
if (value == null) {
await this.searchService.clearIndex(userId);
} else {
await this.searchService.indexCiphers(userId, value);
void this.searchService.indexCiphers(userId, value);
}
}
}