summary refs log tree commit diff
path: root/synapse/handlers/sliding_sync/extensions.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Speed up sliding sync by computing extensions in parallel (#17884)Erik Johnston2024-10-301-11/+28
| | | | | | The main change here is to add a helper function `gather_optional_coroutines`, which works in a similar way as `yieldable_gather_results` but takes a set of coroutines rather than a function
* Minor perf speed up for large accounts on SSS (#17751)Erik Johnston2024-09-301-4/+6
| | | | | | | | | This works as instead of passing *all* rooms to `record_sent_rooms` we only need to pass rooms that were previously not in the LIVE state. This came from a py-spy where we were spending ~10% CPU calling these functions. Note that `record_sent_rooms` is a no-op for rooms that are already in the `LIVE` state, so we only need to call them for `PREVIOUSLY` or `INITIAL` rooms.
* Sliding sync: Add connection tracking to the `account_data` extension (#17695)Erik Johnston2024-09-191-52/+131
| | | | | | | | | | | This is basically exactly the same logic as for receipts. Essentially we just need to track which room account data we have and haven't sent down to clients, and use that when we pull stuff out. I think this just needs a couple of extra tests written --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
* Sliding Sync: Return room tags in account data extension (#17707)Eric Eastwood2024-09-161-18/+92
| | | | | | The account data extension was also updated to avoid copies when we pull the data out of the cache. Fix https://github.com/element-hq/synapse/issues/17694
* Sliding Sync: Increase concurrency of sliding sync a bit (#17696)Erik Johnston2024-09-121-1/+9
| | | | | | For initial requests a typical page size is 20 rooms, so we may as well do the batching as 20. This should speed up bigger syncs a little bit.
* Format files with Ruff (#17643)Quentin Gliech2024-09-021-6/+6
| | | | | | I thought ruff check would also format, but it doesn't. This runs ruff format in CI and dev scripts. The first commit is just a run of `ruff format .` in the root directory.
* Sliding Sync: Make `PerConnectionState` immutable (#17600)Erik Johnston2024-08-291-6/+8
| | | | | | | | | | | | | | | | | This is so that we can cache it. We also move the sliding sync types to `synapse/types/handlers/sliding_sync.py`. This is mainly in-prep for #17599 to avoid circular imports. The only change in behaviour is that `RoomSyncConfig.combine_sync_config(..)` now returns a new room sync config rather than mutating in-place. Reviewable commit-by-commit. --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
* Sliding sync: Always send your own receipts down (#17617)Erik Johnston2024-08-291-21/+57
| | | | | | | | | | | When returning receipts in sliding sync for initial rooms we should always include our own receipts in the room (even if they don't match any timeline events). Reviewable commit-by-commit. --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
* Sliding sync: factor out room list logic (#17622)Erik Johnston2024-08-281-12/+13
| | | | | | | | | Move calculating of the room lists out of the core handler. This should make it easier to switch things around to start using the tables in #17512. This is just moving code between files and methods. Reviewable commit-by-commit
* Sliding sync: Split up handler into its own module (#17595)Erik Johnston2024-08-201-0/+660
That file was getting long. The changes are non functional, and simply split things up into: - the main class - the connection store - the extensions - the types