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

Commit

Permalink
Don't filter state in /context response (#14461)
Browse files Browse the repository at this point in the history
We don't filter state usually, so doing so here is a waste of time. This is not much of an issue for clients that enable lazy loading of members, since there will be fewer state events.
  • Loading branch information
erikjohnston authored and H-Shay committed Dec 13, 2022
1 parent ed5cd1c commit a4e9d61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/14461.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve performance of `/context` in large rooms.
2 changes: 1 addition & 1 deletion synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4e9d61

Please sign in to comment.