summary refs log tree commit diff
path: root/synapse/rest/client/sync.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-12-20 16:34:01 +0000
committerRichard van der Hoff <richard@matrix.org>2021-12-20 16:34:01 +0000
commit8e4083e2f62513c03c97085bb1f42e958980a8fc (patch)
tree57a00a31271d1e16e51dd6998799f18f0b7f03b9 /synapse/rest/client/sync.py
parentReturn JSON errors for unknown resources under /matrix/client. (#11602) (diff)
parentDisable aggregation bundling on `/sync` responses (#11583) (diff)
downloadsynapse-8e4083e2f62513c03c97085bb1f42e958980a8fc.tar.xz
Merge remote-tracking branch 'origin/release-v1.49' into develop
Diffstat (limited to 'synapse/rest/client/sync.py')
-rw-r--r--synapse/rest/client/sync.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py
index dd90ffa123..8c4b0f6e5d 100644
--- a/synapse/rest/client/sync.py
+++ b/synapse/rest/client/sync.py
@@ -525,7 +525,15 @@ class SyncRestServlet(RestServlet):
                 time_now=time_now,
                 # Don't bother to bundle aggregations if the timeline is unlimited,
                 # as clients will have all the necessary information.
-                bundle_aggregations=room.timeline.limited,
+                # bundle_aggregations=room.timeline.limited,
+                #
+                # richvdh 2021-12-15: disable this temporarily as it has too high an
+                # overhead for initialsyncs. We need to figure out a way that the
+                # bundling can be done *before* the events are stored in the
+                # SyncResponseCache so that this part can be synchronous.
+                #
+                # Ensure to re-enable the test at tests/rest/client/test_relations.py::RelationsTestCase.test_bundled_aggregations.
+                bundle_aggregations=False,
                 token_id=token_id,
                 event_format=event_formatter,
                 only_event_fields=only_fields,