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

Cache initial sync response until it is fully handled #4317

Closed
manuroe opened this issue May 11, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#1092
Closed

Cache initial sync response until it is fully handled #4317

manuroe opened this issue May 11, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#1092

Comments

@manuroe
Copy link
Member

manuroe commented May 11, 2021

Initial syncs as we have currently (Sync v2) are expensive for homeservers and clients. With a big account (> 3000 rooms), we can get the response from the server after 70 seconds or more (and if it does not timeout). Then, the iOS app takes 60 seconds to complete the storage to its cache (MXFileStore).

The app is usable before but if the user backgrounds the app too early, it is likely to be killed before cache completion. This means the app will issue another initial /sync request at the next startup.

We should cache the initial sync raw response until the cache is complete. If the app is killed before the cache completion, we will be able to replay this cached initial sync response, saving those 70 seconds of more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants