This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Improve performance of /sync when the filter specifies no room IDs #14784
Labels
A-Sync
defects related to /sync
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Minor
Blocks non-critical functionality, workarounds exist.
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Description
Related: #10842
It would be niceIt is critical for Sliding Sync if Synapse checked if the filter JSON was specifying a set of room IDs, and if so just apply /sync to those rooms, which should be significantly faster than a general /sync.Context: Sliding Sync hits /sync on behalf of users. The first sync is always slow because it needs the data from /sync. However, the first /sync on a 2nd+ device for the same user can be very fast, because the proxy does not wait for the /sync response, it can just serve up the room data fetched from the 1st device. However, to-device messages are per-device and only arrive with the /sync response: I can't do the same trick. In an effort to reduce the /sync time, I specify a filter with
room.rooms=[]
which means "no room IDs". This correctly returns no rooms, but it still takes just as long to process.The end-user impact here is that, whilst Matthew can login to sliding-sync enabled Elements within seconds, it takes 15+ minutes before he can read E2EE messages because to-device messages are delayed.
Steps to reproduce
{ room: { rooms: [] } }
Homeserver
matrix.org
Synapse Version
1.74.0
Installation Method
Other (please mention below)
Database
N/A
Workers
Multiple workers
Platform
N/A
Configuration
N/A
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: