-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use get_current_users_in_room from store and not StateHandler #9910
Changes from 5 commits
996c0ce
0c8cd62
6640fb4
7e5f78a
8624333
4a8a483
7e3d333
cad5a47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve performance after joining a large room when presence is enabled. | ||
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -69,6 +69,7 @@ def _invalidate_state_caches( | |||
self._attempt_to_invalidate_cache("is_host_joined", (room_id, host)) | ||||
|
||||
self._attempt_to_invalidate_cache("get_users_in_room", (room_id,)) | ||||
self._attempt_to_invalidate_cache("get_users_in_room_with_profiles", (room_id,)) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, err, we didn't ever invalidate this cache. I think we only ever used this function when handling visibility changes in the user directory, so I think its probably fairly unlikely that this bit anyone... synapse/synapse/handlers/user_directory.py Line 305 in c571736
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the question is whether we want to pull this into a separate PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "meh". I woudn't bother. You could always stick in a |
||||
self._attempt_to_invalidate_cache("get_room_summary", (room_id,)) | ||||
self._attempt_to_invalidate_cache("get_current_state_ids", (room_id,)) | ||||
|
||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are performance improvements features? They're not new buttons per se.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the line is obviously fuzzy, but to me the question is whether it is interesting to Synapse admins/users - in which case, it's a
.feature
- or just developers, in which case it's a.misc
.