-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
EDR takes minutes to send messages after importing offline key backup. #26783
Comments
might be related to #26488 |
Analysis of the problem: What happens is that when group sessions are mark as backep_up the sdk start a readwrite transaction on If now a new message is sent from a room that needs a new session, it will create an outbound session and the inbound that it wants to store. => Calls So the sending of the message is locked until the mark as backed-up as complete. Now that The fact that Can be reproduced with any call that For example, type this in the console: This will also be slow and locks the inbound group session store.
=> The sending will be super slow (depending on your number of keys) |
update:
After a closer look it's not
|
We don't consider this a release blocker for Element R, because once your imported keys are (eventually) backed up, performance recovers. |
Some more findings: When the Can be reproduced by typing this in the console:
Just after starting this, you can try to send a message. It will be blocked until the count request has completed. The count performances are particularly bad on Firefox from my testing: Firefox:
The same database on Chrome:
So in my case as backuploop is running, a call is made after each chunk to count the remaining keys for signaling. And if you send a message it would be delayed by around ~30s on firefox. On legacy the inbound_group_sessions are not saved in the same way in the database. And count performances are a lot better on legacy with the same database (1s instead of 38s). I did some experiment on the So maybe related to the size of the data? Anyhow, for now we might want to stop counting the rows during the key loop as a temporary improvement |
Confirmed fixed by matrix-org/matrix-js-sdk#4015 \o/ |
Steps to reproduce
await mxMatrixClientPeg.get().getCrypto().backupManager.disableKeyBackup()
at the JS console) fixes it.There's a chance that the slow send isn't related to me having importing the offline keybackup, but by having connected to the online backup. However, EWR is fine after connecting to online backup.
As a final symptom: i'm seeing a lot of E2EE traffic coming in from online backup (with grey shields) rather than direct.
This may be related to #26375
Outcome
What did you expect?
Fast send
What happened instead?
Agonisingly slow send.
Operating system
No response
Application version
Element Nightly version: 2023121601 Crypto version: Rust SDK 0.6.0 (438880a), Vodozemac 0.5.0
How did you install the app?
No response
Homeserver
No response
Will you send logs?
Yes
The text was updated successfully, but these errors were encountered: