-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
if key[0] != EventTypes.Member: | ||
continue | ||
|
||
user_id = key[1] |
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.
If we are optimising it might be worth noting that a, b = key
seems to be faster than a = key[0], b = key[1]
@@ -200,6 +200,10 @@ def __init__(self, hs, room_id, rules_for_room_cache): | |||
# not update the cache with it. | |||
self.sequence = 0 | |||
|
|||
# A cache of user_ids that we *know* aren't interesting, e.g. user_ids | |||
# owned by AS's, or remote users, etc. | |||
self.uninteresting_user_set = set() |
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.
Could we have a comment explaining why this cache doesn't need invalidation.
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.
Also might be worth explaining that "uninteresting" means "will never have push rules on this server"
Other than commenting on the |
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.
LGTM
No description provided.