-
- Downloads
Sliding Sync: Avoid fetching left rooms and add back `newly_left` rooms (#17725)
Performance optimization: We can avoid fetching rooms that the user has
left themselves (which could be a significant amount), then only add
back rooms that the user has `newly_left` (left in the token range of an
incremental sync). It's a lot faster to fetch less rooms than fetch them
all and throw them away in most cases. Since the user only leaves a room
(or is state reset out) once in a blue moon, we can avoid a lot of work.
Based on @erikjohnston's branch, erikj/ss_perf
---------
Co-authored-by:
Erik Johnston <erik@matrix.org>
Showing
- changelog.d/17725.misc 1 addition, 0 deletionschangelog.d/17725.misc
- synapse/handlers/sliding_sync/__init__.py 19 additions, 7 deletionssynapse/handlers/sliding_sync/__init__.py
- synapse/handlers/sliding_sync/room_lists.py 182 additions, 97 deletionssynapse/handlers/sliding_sync/room_lists.py
- synapse/storage/databases/main/roommember.py 45 additions, 1 deletionsynapse/storage/databases/main/roommember.py
- synapse/storage/databases/main/state.py 18 additions, 2 deletionssynapse/storage/databases/main/state.py
- synapse/storage/databases/main/stream.py 7 additions, 0 deletionssynapse/storage/databases/main/stream.py
- tests/rest/client/sliding_sync/test_sliding_sync.py 478 additions, 1 deletiontests/rest/client/sliding_sync/test_sliding_sync.py
- tests/storage/test_stream.py 83 additions, 2 deletionstests/storage/test_stream.py
Loading
Please register or sign in to comment