[PM-38270] perf: Speed up "claimed by organization" status checks on the Members page - #8125
[PM-38270] perf: Speed up "claimed by organization" status checks on the Members page#8125r-tome wants to merge 1 commit into
Conversation
…tionUsersClaimedStatusQuery
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed a single-file performance refactor in Code Review DetailsNo findings at or above the reporting threshold. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8125 +/- ##
===========================================
+ Coverage 15.18% 62.88% +47.70%
===========================================
Files 1409 2304 +895
Lines 61106 100276 +39170
Branches 4865 9028 +4163
===========================================
+ Hits 9277 63063 +53786
+ Misses 51664 35029 -16635
- Partials 165 2184 +2019 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38270
📔 Objective
GetOrganizationUsersClaimedStatusQueryused.Any()inside aToDictionaryto test each user ID against the full claimed-users list — an O(n·m) scan that worsens as the Members page grows. This replaces it with aHashSet<Guid>built once before the loop, reducing complexity to O(n+m). Mirrors the same fix applied toTwoFactorIsEnabledQueryin PM-38265.