Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Avoid pulling the full state of a room out so often. #1047

Merged
merged 16 commits into from
Aug 26, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Measure _filter_events_for_server
  • Loading branch information
erikjohnston committed Aug 26, 2016
commit 11faa4296d1109ff6370cedf5c9e3bd688266792
2 changes: 2 additions & 0 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from synapse.util.logcontext import (
PreserveLoggingContext, preserve_fn, preserve_context_over_deferred
)
from synapse.util.metrics import measure_func
from synapse.util.logutils import log_function
from synapse.util.async import run_on_reactor
from synapse.util.frozenutils import unfreeze
Expand Down Expand Up @@ -235,6 +236,7 @@ def on_receive_pdu(self, origin, pdu, state=None, auth_chain=None):
user = UserID.from_string(event.state_key)
yield user_joined_room(self.distributor, user, event.room_id)

@measure_func("_filter_events_for_server")
@defer.inlineCallbacks
def _filter_events_for_server(self, server_name, room_id, events):
event_to_state_ids = yield self.store.get_state_ids_for_events(
Expand Down