-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
Decrypt and Import full backups in chunk with progress #4005
Decrypt and Import full backups in chunk with progress #4005
Conversation
225175b
to
1f86960
Compare
1f86960
to
4216e1e
Compare
4216e1e
to
f76e465
Compare
f76e465
to
509613f
Compare
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.
LGTM generally. I assume this still downloads the lot in one lump, but this would need server changes so one step at a time and this is definitely a step in the right direcvtion. Might want a look from someone crypto-y too.
* | ||
* @returns A promise that resolves when the decryption is complete. | ||
*/ | ||
private async handleDecryptionOfAFullBackup( |
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.
This could be a nice use of a generator function, potentially? Not a blocker though.
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.
Looks good - lots of tiny comments but nothing major. Thanks!
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.
Looks great - one typo. Thanks!
Co-authored-by: Andy Balaam <[email protected]>
Fixes element-hq/element-web#26856
Fixes element-hq/element-web#23359 as it will chunk the importing of keys.
Current State
Currently Web will download all the keys from the server, then will decrypt them all and keep them in memory (with no feedbacks during the decryption process), then will import them all at once to the crypto store.
Changes
Now the keys will be split in chunks, then each chunk is decrypted and imported before processing to the next one.
This is a good improvement, but more work need to be done to have a proper download of a big backup. As an example you can't cancel an import at the moment. So if you close the dialog it will continue without feedback, and you can also start a new one in parallel.
Checklist
Here's what your changelog entry will look like:
🐛 Bug Fixes