diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-12-20 16:33:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 16:33:35 +0000 |
commit | 76aa5537ad4f41cad130862a230c1f4cc4bfcbcf (patch) | |
tree | dd2e9a55b4635a9c288fad1a506d9b3415f6ac0f /synapse/rest | |
parent | Restructure changelog (diff) | |
download | synapse-76aa5537ad4f41cad130862a230c1f4cc4bfcbcf.tar.xz |
Disable aggregation bundling on `/sync` responses (#11583)
* Disable aggregation bundling on `/sync` responses A partial revert of #11478. This turns out to have had a significant CPU impact on initial-sync handling. For now, let's disable it, until we find a more efficient way of achieving this. * Fix tests. Co-authored-by: Patrick Cloke <patrickc@matrix.org>
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/sync.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py index 88e4f5e063..7f5846d389 100644 --- a/synapse/rest/client/sync.py +++ b/synapse/rest/client/sync.py @@ -522,7 +522,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, |