-
-
Notifications
You must be signed in to change notification settings - Fork 590
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
KeyBackup: Disable signalling remaining keys to upload count #4010
Conversation
12a3cb9
to
b78635c
Compare
@@ -342,20 +342,29 @@ export class RustBackupManager extends TypedEventEmitter<RustBackupCryptoEvents, | |||
|
|||
if (!request || this.stopped || !this.activeBackupVersion) { | |||
logger.log(`Backup: Ending loop for version ${this.activeBackupVersion}.`); | |||
if (!request) { | |||
// nothing more to upload | |||
this.emit(CryptoEvent.KeyBackupSessionsRemaining, 0); |
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.
Some test relies on this event to be fired at the end of the backup loop.
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 comment should probably be in the code, not the PR.
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 but please move your comment into the code
Closing in favor of #4015 |
Related to element-hq/element-web#26783 (comment)
Keys count performance can be pretty bad on some configurations (big database in FF).
For now we disable signalling the remaining key count to upload on rust crypto. (used by react sdk
SecureBackupPanel.tsx
to provide some feedback).Note for reviewer:
I considered caching the count by only doing it when the backup loop is started.
The problem is that at the end of each sync you might receive some new keys and that could start a backup loop, meaning that the send performances could be degraded after each sync.
So for now, it's just disabled until we improve the store performances (count shouldn't take 10s of seconds)
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.