Skip to content

feat: batch decryption - WPB-17614 #3078

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

Merged
merged 4 commits into from
May 30, 2025
Merged

Conversation

github-actions[bot]
Copy link
Contributor

This PR was automatically cherry-picked based on the following PR:

Original PR description:


TaskWPB-17614 [iOS] : Batch Decryption

Issue

Decrypt events in batches when pulling events.

This accomplished by adding an optional context argument to all decryption functions. If omitted the decryption methods behave as before by opening a separate transaction for each single operation, but if it's provided the decryption operation will happen on an existing transaction context.

Currently only the PullPendingUpdateEventsSync use the context argument. We would also need to add batch decryption to the async notifications code path once it's available.

Testing

App is still processing events without errors.

Non-scientific benchmark

Running on a simulator I've collected roughly 500 text messages and measured how long it took for PullPendingUpdateEventsSync to decrypt them all.

using batch decryption

It took 967.583625 ms to decrypt 504 event(s)[process_name:Wire][account_id:9e98572***][self_client_id:29c8014***][process_id:70968]

without batch decryption

It took 10356.630792 ms to decrypt 504 event(s)[process_id:71884][self_client_id:29c8014***][process_name:Wire][account_id:9e98572***]

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Co-authored-by: Christoph Aldrian <christoph.aldrian@wire.com>
Co-authored-by: Dmitry Simkin <dzmitry.simkin.ext@wire.com>
Co-authored-by: Christoph Aldrian <caldrian@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sam Wyndham <samwyndham@users.noreply.github.com>
Co-authored-by: François Benaiteau <netbe@users.noreply.github.com>
Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

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

no merge conflicts

@netbe netbe closed this May 27, 2025
@netbe netbe reopened this May 27, 2025
@netbe netbe enabled auto-merge May 27, 2025 08:18
Copy link
Contributor Author

github-actions bot commented May 27, 2025

Test Results

    6 files    655 suites   8m 12s ⏱️
5 329 tests 5 324 ✅ 0 💤 5 ❌
5 329 runs  5 329 ✅ 0 💤 0 ❌

For more details on these failures, see this check.

Results for commit 7bd5c78.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented May 27, 2025

Datadog Report

Branch report: feat/batch-decryption-cherry-pick
Commit report: 7bdeb3d
Test service: wire-ios-mono

✅ 0 Failed, 5329 Passed, 0 Skipped, 4m 24.71s Total Time

@netbe netbe added this pull request to the merge queue May 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 27, 2025
@typfel typfel added this pull request to the merge queue May 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 27, 2025
@caldrian caldrian enabled auto-merge May 30, 2025 13:59
@caldrian caldrian added this pull request to the merge queue May 30, 2025
Merged via the queue into develop with commit 791f8fd May 30, 2025
13 checks passed
@caldrian caldrian deleted the feat/batch-decryption-cherry-pick branch May 30, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants