diff options
author | Erik Johnston <erik@matrix.org> | 2023-07-20 15:51:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 15:51:28 +0100 |
commit | fc1e534e411174d730ca3c0c7e4d2ef7fd8be56b (patch) | |
tree | 4f84eeb42805225e21ef2a811b4af5852d812e81 /synapse/handlers | |
parent | Fixed grafana deploy annotations in the dashboard config, so it shows for tho... (diff) | |
download | synapse-fc1e534e411174d730ca3c0c7e4d2ef7fd8be56b.tar.xz |
Speed up updating state in large rooms (#15971)
This should speed up updating state in rooms with lots of state.
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/message.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 9910716bc6..fff0b5fa12 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -1565,12 +1565,11 @@ class EventCreationHandler: if state_entry.state_group in self._external_cache_joined_hosts_updates: return - state = await state_entry.get_state( - self._storage_controllers.state, StateFilter.all() - ) with opentracing.start_active_span("get_joined_hosts"): - joined_hosts = await self.store.get_joined_hosts( - event.room_id, state, state_entry + joined_hosts = ( + await self._storage_controllers.state.get_joined_hosts( + event.room_id, state_entry + ) ) # Note that the expiry times must be larger than the expiry time in |