Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fedemkr
Copy link
Member

@fedemkr fedemkr commented Sep 16, 2025

🎟️ Tracking

PM-24290

📔 Objective

Improve autofill cipher lists performance on .passwords and .combinedSingleSection modes by applying the refactor to use the data/section builders.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

….combinedSingleSection modes by applying the refactor to use the data/section builders.
@fedemkr fedemkr changed the title PM-24290 Improve autofill cipher lists performance on .passwords and … [PM-24290] Improve autofill cipher lists performance Sep 16, 2025
@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 98.77301% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.33%. Comparing base (9f0c578) to head (2b4f5e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...d/Core/Vault/Helpers/VaultListDataPreparator.swift 98.43% 1 Missing ⚠️
...e/Vault/Helpers/VaultListPreparedDataBuilder.swift 96.96% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

Logo
Checkmarx One – Scan Summary & Detailse4e376ae-9d2a-4f87-a277-cfe857ef7ef1

Great job! No new security vulnerabilities introduced in this pull request

@fedemkr fedemkr marked this pull request as ready for review September 24, 2025 19:24
@fedemkr fedemkr requested review from a team and matt-livefront as code owners September 24, 2025 19:24
Comment on lines 41 to 43
guard !ciphers.isEmpty else { return VaultListData() }

guard let preparedData = try await vaultListDataPreparator.prepareAutofillCombinedSingleData(
Copy link
Collaborator

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)
Copy link
Collaborator

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?

Suggested change
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⛏️

Suggested change
let restrictedOrganizationIds: [String] = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder)
let restrictedOrganizationIds = await prepareRestrictedOrganizationIds(builder: preparedDataBuilder)

Comment on lines 148 to 152
guard let id = cipher.id else {
return self
}

guard let cipherRaw = try await cipherService.fetchCipher(withId: id) else { return self }
Copy link
Collaborator

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?

@fedemkr fedemkr merged commit 6fc5491 into main Sep 29, 2025
10 checks passed
@fedemkr fedemkr deleted the PM-24290/impr-perf-autofill-lists branch September 29, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants