-
Notifications
You must be signed in to change notification settings - Fork 87
[PM-24290] Improve autofill cipher lists performance #1939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
….combinedSingleSection modes by applying the refactor to use the data/section builders.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1939 +/- ##
==========================================
+ Coverage 81.29% 81.33% +0.03%
==========================================
Files 822 823 +1
Lines 52015 52136 +121
==========================================
+ Hits 42284 42403 +119
- Misses 9731 9733 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great job! No new security vulnerabilities introduced in this pull request |
# Conflicts: # Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved
| guard !ciphers.isEmpty else { return VaultListData() } | ||
|
|
||
| guard let preparedData = try await vaultListDataPreparator.prepareAutofillCombinedSingleData( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ It looks like prepareAutofillCombinedSingleData also does this isEmpty check. Is it worth eliminating this one?
| let cipherMatchingHelper = await cipherMatchingHelperFactory.make(uri: uri) | ||
|
|
||
| var preparedDataBuilder = vaultListPreparedDataBuilderFactory.make() | ||
| let restrictedOrganizationIds: [String] = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Can the type be inferred here?
| let restrictedOrganizationIds: [String] = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) | |
| let restrictedOrganizationIds = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) |
| let cipherMatchingHelper = await cipherMatchingHelperFactory.make(uri: uri) | ||
|
|
||
| var preparedDataBuilder = vaultListPreparedDataBuilderFactory.make() | ||
| let restrictedOrganizationIds: [String] = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️
| let restrictedOrganizationIds: [String] = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) | |
| let restrictedOrganizationIds = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder) |
| guard let id = cipher.id else { | ||
| return self | ||
| } | ||
|
|
||
| guard let cipherRaw = try await cipherService.fetchCipher(withId: id) else { return self } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Could we combine these guards?
🎟️ Tracking
PM-24290
📔 Objective
Improve autofill cipher lists performance on
.passwordsand.combinedSingleSectionmodes by applying the refactor to use the data/section builders.⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes