mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 08:24:07 -04:00
Add some comments to areas that could be optimised.
This commit is contained in:
parent
3fbb031745
commit
5645d9747b
3 changed files with 14 additions and 1 deletions
|
@ -59,6 +59,14 @@ def evaluator_for_room_id(room_id, hs, store):
|
|||
|
||||
|
||||
class BulkPushRuleEvaluator:
|
||||
"""
|
||||
Runs push rules for all users in a room.
|
||||
This is faster than running PushRuleEvaluator for each user because it
|
||||
fetches all the rules for all the users in one (batched) db query
|
||||
rarher than doing multiple queries per-user. It currently uses
|
||||
the same logic to run the actual rules, but could be optimised further
|
||||
(see https://matrix.org/jira/browse/SYN-562)
|
||||
"""
|
||||
def __init__(self, room_id, rules_by_user, display_names, users_in_room):
|
||||
self.room_id = room_id
|
||||
self.rules_by_user = rules_by_user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue