diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-10 09:22:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 14:22:16 +0000 |
commit | cf5233b783273efc84b991e7242fb4761ccc201a (patch) | |
tree | a7f940361308ce730a6d9064803fbb5bee890bd1 /synapse/handlers/initial_sync.py | |
parent | Merge branch 'release-v1.77' into develop (diff) | |
download | synapse-cf5233b783273efc84b991e7242fb4761ccc201a.tar.xz |
Avoid fetching unused account data in sync. (#14973)
The per-room account data is no longer unconditionally fetched, even if all rooms will be filtered out. Global account data will not be fetched if it will all be filtered out.
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r-- | synapse/handlers/initial_sync.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py index 191529bd8e..1a29abde98 100644 --- a/synapse/handlers/initial_sync.py +++ b/synapse/handlers/initial_sync.py @@ -154,9 +154,8 @@ class InitialSyncHandler: tags_by_room = await self.store.get_tags_for_user(user_id) - account_data, account_data_by_room = await self.store.get_account_data_for_user( - user_id - ) + account_data = await self.store.get_global_account_data_for_user(user_id) + account_data_by_room = await self.store.get_room_account_data_for_user(user_id) public_room_ids = await self.store.get_public_room_ids() |