Skip to content
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

End of the removal of decryption on the main thread #1095

Merged
merged 12 commits into from
May 20, 2021

Conversation

manuroe
Copy link
Contributor

@manuroe manuroe commented May 19, 2021

Finish the work started in #1091.

Decryptions do not happen anymore on the main thread.
Synchronous decryption methods are marked as deprecated.

This makes the app much more reactive.

as it is not available in the decrypted JSON content
that does not pollute existing listeners on the live timeline

There can be only one component that paginates message from a time else there is will be races.
Use MXSession.decryptEvents to get decrypted events.
…ith the decryption queue.

A single decryption takes 5ms on an iPhoneX. It was useless to synchronise this method with the busy decryption thread. There is no relationship.

Note that this operation uses 0.5ms. It must not be called from the main thread.
MatrixKit uses this method to build the timeline. It uses on a dedicated queue.
We must not call complete() before returning.
It breaks pagination in MatrixKit that uses the returned MXHTTPOperation.
This method is called from the main thread. It should not use directly elf.crypto.deviceList that is managed by the cryptoQueue.
MatrixSDK/Data/MXEventTimeline.m Outdated Show resolved Hide resolved
MatrixSDK/Data/MXEventTimeline.m Outdated Show resolved Hide resolved
manuroe and others added 3 commits May 20, 2021 08:33
Co-authored-by: SBiOSoftWhare <SBiOSoftWhare@users.noreply.github.com>
Co-authored-by: SBiOSoftWhare <SBiOSoftWhare@users.noreply.github.com>
@manuroe manuroe merged commit d8ed7e2 into manu/async_decryption May 20, 2021
@manuroe manuroe deleted the manu/async_decryption2 branch May 20, 2021 08:26
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.

None yet

2 participants