diff options
author | Erik Johnston <erikj@element.io> | 2024-09-30 12:58:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 12:58:02 +0100 |
commit | ece66ba61c3e2fe5b968ac564ea4d9019ddc7c70 (patch) | |
tree | b15a217f705776622702b154c11c406b22b48e79 /synapse/handlers/sliding_sync/extensions.py | |
parent | Merge branch 'release-v1.116' into develop (diff) | |
download | synapse-ece66ba61c3e2fe5b968ac564ea4d9019ddc7c70.tar.xz |
Minor perf speed up for large accounts on SSS (#17751)
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.
Diffstat (limited to 'synapse/handlers/sliding_sync/extensions.py')
-rw-r--r-- | synapse/handlers/sliding_sync/extensions.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/sliding_sync/extensions.py b/synapse/handlers/sliding_sync/extensions.py |