mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-03 03:26:21 -04:00
Reduce state pulled from DB due to sending typing and receipts over federation (#12964)
Reducing the amount of state we pull from the DB is useful as fetching state is expensive in terms of DB, CPU and memory.
This commit is contained in:
parent
148fe58a24
commit
44de53bb79
9 changed files with 68 additions and 16 deletions
|
@ -172,10 +172,6 @@ class StateHandler:
|
|||
entry = await self.resolve_state_groups_for_events(room_id, latest_event_ids)
|
||||
return await self.store.get_joined_users_from_state(room_id, entry)
|
||||
|
||||
async def get_current_hosts_in_room(self, room_id: str) -> FrozenSet[str]:
|
||||
event_ids = await self.store.get_latest_event_ids_in_room(room_id)
|
||||
return await self.get_hosts_in_room_at_events(room_id, event_ids)
|
||||
|
||||
async def get_hosts_in_room_at_events(
|
||||
self, room_id: str, event_ids: Collection[str]
|
||||
) -> FrozenSet[str]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue