1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 20:50:28 +00:00
Files
browser/apps
Miles Blackwood 12c8857dbd Add dual-index cache for O(1) opid lookups
Implements a reverse index (autofillFieldsByOpid) to enable O(1) lookups
by opid instead of iterating through all cached elements.

Key changes:
- Add autofillFieldsByOpid Map for direct opid → element lookups
- Update getAutofillFieldElementByOpid to use dual-index with stale check
- Maintain both indices in cacheAutofillFieldElement
- Clean up both indices in clear and delete operations

Performance: Eliminates O(n) array iteration on every opid lookup.
2026-02-02 17:37:16 -05:00
..