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

SSS: Persist the pos token so that it gets reused across app restarts #3936

Open
erikjohnston opened this issue Sep 3, 2024 · 7 comments · Fixed by #4035
Open

SSS: Persist the pos token so that it gets reused across app restarts #3936

erikjohnston opened this issue Sep 3, 2024 · 7 comments · Fixed by #4035
Assignees

Comments

@erikjohnston
Copy link
Member

erikjohnston commented Sep 3, 2024

Should only be done after #3935

This is so that after restart we don't do an initial sync, which pulls in all the room data again (causing load on the server, and also on the client and bandwidth).

(cc. @Hywan)

@Hywan
Copy link
Member

Hywan commented Sep 3, 2024

Thanks for creating the issue.

@bnjbvr
Copy link
Member

bnjbvr commented Sep 3, 2024

For reference: we tried in the past and ran into sync issues (something something multiple processes on iOS because of NSE process? can't recall the details), so had to emergency-disable it:

//.share_pos() // TODO(bnjbvr) This is racy, needs cross-process lock :')

PR disabling it: #2525

@MatMaul
Copy link
Contributor

MatMaul commented Sep 7, 2024

Oh my goodness :)
After adding some logs in synapse I can confirm this is why the sync after an app restart is slow on Android.

Could we enable share_pos on the room list here without triggering cross processes dragons ?

If not can we make this an option so that we can store the pos at least on Android in the meantime ?

@MatMaul
Copy link
Contributor

MatMaul commented Sep 7, 2024

Could we enable share_pos on the room list here without triggering cross processes dragons ?

I don't know if it's enough to not trigger dragons but it seems like the NotificationClient does not initialize the room list service in multiprocesses mode.

@bnjbvr
Copy link
Member

bnjbvr commented Sep 9, 2024

The PR I've listed above disabled it for the encryption sync; we could enable it for the state sync, since the notification client uses a different connection id than the main app.

@MatMaul
Copy link
Contributor

MatMaul commented Sep 12, 2024

FYI I've been running a modified version since a couple of days with share_pos on the room-list sliding sync instance and it's a night and day difference.
As expected no trouble on my Android, but I don't have the means to test iOS.

@Hywan
Copy link
Member

Hywan commented Nov 13, 2024

We are disabling share_pos() because it creates slowness (see #4244). Reopening this issue.

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

Successfully merging a pull request may close this issue.

4 participants