Cache user IDs instead of profile objects (#13573)

The profile objects are never used and increase cache size significantly.
This commit is contained in:
Nick Mills-Barrett 2022-08-23 10:49:59 +01:00 committed by GitHub
parent 37f329c9ad
commit 5e7847dc92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 54 deletions

View file

@ -2421,10 +2421,10 @@ class SyncHandler:
joined_room.room_id, joined_room.event_pos.stream
)
)
users_in_room = await self.state.get_current_users_in_room(
user_ids_in_room = await self.state.get_current_user_ids_in_room(
joined_room.room_id, extrems
)
if user_id in users_in_room:
if user_id in user_ids_in_room:
joined_room_ids.add(joined_room.room_id)
return frozenset(joined_room_ids)