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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user