diff options
author | Erik Johnston <erikj@jki.re> | 2017-03-31 10:10:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 10:10:56 +0100 |
commit | 9cee0ce7dbbf34edc8542b4b02e36ab978da2715 (patch) | |
tree | 9832e523b67b8bb43e0bd7bbe2f3ceac233e3e1c /synapse/visibility.py | |
parent | Merge pull request #2076 from matrix-org/erikj/as_perf (diff) | |
parent | Remove unused instance variable (diff) | |
download | synapse-9cee0ce7dbbf34edc8542b4b02e36ab978da2715.tar.xz |
Merge pull request #2075 from matrix-org/erikj/cache_speed
Speed up cached function access
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r-- | synapse/visibility.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py index 31659156ae..c4dd9ae2c7 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -56,7 +56,8 @@ def filter_events_for_clients(store, user_tuples, events, event_id_to_state): events ([synapse.events.EventBase]): list of events to filter """ forgotten = yield preserve_context_over_deferred(defer.gatherResults([ - preserve_fn(store.who_forgot_in_room)( + defer.maybeDeferred( + preserve_fn(store.who_forgot_in_room), room_id, ) for room_id in frozenset(e.room_id for e in events) |