diff --git a/changelog.d/14461.misc b/changelog.d/14461.misc new file mode 100644 index 000000000000..cdfa577a4c37 --- /dev/null +++ b/changelog.d/14461.misc @@ -0,0 +1 @@ +Improve performance of `/context` in large rooms. diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 66a50bca6eb6..6dcfd86fdf36 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -1451,7 +1451,7 @@ async def filter_evts(events: List[EventBase]) -> List[EventBase]: events_before=events_before, event=event, events_after=events_after, - state=await filter_evts(state_events), + state=state_events, aggregations=aggregations, start=await token.copy_and_replace( StreamKeyType.ROOM, results.start