summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-11-16 12:09:33 +0000
committerGitHub <noreply@github.com>2022-11-16 12:09:33 +0000
commit945a0928c793c0bd8573e179583d983187e5f392 (patch)
tree433e346f7bd62397446b9d68b4a9c3186c05b3f7
parentFix stub return type of `PushRuleEvaluator.run` (#14451) (diff)
downloadsynapse-945a0928c793c0bd8573e179583d983187e5f392.tar.xz
Don't filter state in /context response (#14461)
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.
Diffstat (limited to '')
-rw-r--r--changelog.d/14461.misc1
-rw-r--r--synapse/handlers/room.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/14461.misc b/changelog.d/14461.misc
new file mode 100644
index 0000000000..cdfa577a4c
--- /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 66a50bca6e..6dcfd86fdf 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -1451,7 +1451,7 @@ class RoomContextHandler:
             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