This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change
1
+ Fix a performance regression in `/sync` handling, introduced in 1.49.0.
Original file line number Diff line number Diff line change @@ -525,7 +525,15 @@ def serialize(events: Iterable[EventBase]) -> Awaitable[List[JsonDict]]:
525
525
time_now = time_now ,
526
526
# Don't bother to bundle aggregations if the timeline is unlimited,
527
527
# as clients will have all the necessary information.
528
- bundle_aggregations = room .timeline .limited ,
528
+ # bundle_aggregations=room.timeline.limited,
529
+ #
530
+ # richvdh 2021-12-15: disable this temporarily as it has too high an
531
+ # overhead for initialsyncs. We need to figure out a way that the
532
+ # bundling can be done *before* the events are stored in the
533
+ # SyncResponseCache so that this part can be synchronous.
534
+ #
535
+ # Ensure to re-enable the test at tests/rest/client/test_relations.py::RelationsTestCase.test_bundled_aggregations.
536
+ bundle_aggregations = False ,
529
537
token_id = token_id ,
530
538
event_format = event_formatter ,
531
539
only_event_fields = only_fields ,
Original file line number Diff line number Diff line change @@ -577,11 +577,11 @@ def _find_and_assert_event(events):
577
577
assert_bundle (channel .json_body ["event" ]["unsigned" ].get ("m.relations" ))
578
578
579
579
# Request sync.
580
- channel = self .make_request ("GET" , "/sync" , access_token = self .user_token )
581
- self .assertEquals (200 , channel .code , channel .json_body )
582
- room_timeline = channel .json_body ["rooms" ]["join" ][self .room ]["timeline" ]
583
- self .assertTrue (room_timeline ["limited" ])
584
- _find_and_assert_event (room_timeline ["events" ])
580
+ # channel = self.make_request("GET", "/sync", access_token=self.user_token)
581
+ # self.assertEquals(200, channel.code, channel.json_body)
582
+ # room_timeline = channel.json_body["rooms"]["join"][self.room]["timeline"]
583
+ # self.assertTrue(room_timeline["limited"])
584
+ # _find_and_assert_event(room_timeline["events"])
585
585
586
586
# Note that /relations is tested separately in test_aggregation_get_event_for_thread
587
587
# since it needs different data configured.
You can’t perform that action at this time.
0 commit comments