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

If you launch the app from a push notif, you can be shown stale timeline with no spinner #4471

Closed
ara4n opened this issue Jun 24, 2021 · 6 comments · Fixed by matrix-org/matrix-ios-sdk#1144

Comments

@ara4n
Copy link
Member

ara4n commented Jun 24, 2021

After a few seconds messages start to be shown (still no spinner), and then after a few more seconds it catches up entirely - then briefly shows the grey spinner. This on 1.4.3 TF

@manuroe
Copy link
Member

manuroe commented Jun 24, 2021

There is an issue in the state of the MXSession.

What is happening behind the scene is that we start replaying /sync responses we got and cached when fetching data to display push notifications. I am surprised that it is so slow but I can observe it.

Then, we do an incremental sync with the server. This is when the grey spinner appears.

@manuroe
Copy link
Member

manuroe commented Jun 24, 2021

This /sync responses replay makes the UX even weirder on room lists when you got invites and join rooms while the ios app was in the background.

@manuroe
Copy link
Member

manuroe commented Jun 24, 2021

We should probably merge all cached sync responses into one.
We have several of them because we have only 12MB of RAM to manage them in the notification extension. We have more than 1GB in the app.

It will kill the replay dance.
It will solve the room invites that briefly appears (if the sync response merging algo is smart enough).
It will reduce the number of data. There is probably gaps in the updated timelines. This should help on performance.
The SDK emits data refresh events on every /sync response handling completion. Having a single response will produce less refreshs and less computation.

@ara4n ara4n changed the title If you launch the app from a push notif, you can shown stale timeline with no spinner If you launch the app from a push notif, you can be shown stale timeline with no spinner Jun 24, 2021
@ara4n
Copy link
Member Author

ara4n commented Jun 28, 2021

As a quick workaround, can we show the catchup spinner until it's actually caught up? The worst thing here is that it's showing you stale content with no UI to warn you that it's stale.

@manuroe
Copy link
Member

manuroe commented Jun 28, 2021

The catchup spinner will be fixed with the MXSession state fix.

I have the feeling that merging all cached sync responses will improve the performance a lot. I cannot understand why the app stays so long in a stale state while everything is available locally.
It will also help to better handle the MXSession state.

@ara4n
Copy link
Member Author

ara4n commented Aug 9, 2021

i'm getting this more and more, and it's taking so long to catch up it looks as if messages are missing entirely - with no spinner to tell you that you're looking at known stale content.

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