mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-05 23:48:58 +01:00
eb29a31550
Should fix the following issues or make a lot less worse when using Postgres: The main issue behind #2911: The client gives up after a certain time, causing a cascade of context errors, because the response couldn't be built up fast enough. This mostly happens on accounts with many rooms, due to the inefficient way we're getting recent events and current state For #2777: The queries for getting the membership events for history visibility were being executed for each room (I think 185?), resulting in a whooping 2k queries for membership events. (Getting the statesnapshot -> block nids -> actual wanted membership event) Both should now be better by: - Using a LATERAL join to get all recent events for all joined rooms in one go (TODO: maybe do the same for room summary and current state etc) - If we're lazy loading on initial syncs, we're now not getting the whole current state, just to drop the majority of it because we're lazy loading members - we add a filter to exclude membership events on the first call to `CurrentState`. - Using an optimized query to get the membership events needed to calculate history visibility --------- Co-authored-by: kegsay <kegan@matrix.org> |
||
---|---|---|
.. | ||
deltas | ||
account_data_table.go | ||
backwards_extremities_table.go | ||
current_room_state_table.go | ||
filter_table.go | ||
filtering.go | ||
ignores_table.go | ||
invites_table.go | ||
memberships_table.go | ||
notification_data_table.go | ||
output_room_events_table.go | ||
output_room_events_topology_table.go | ||
peeks_table.go | ||
presence_table.go | ||
receipt_table.go | ||
relations_table.go | ||
send_to_device_table.go | ||
syncserver.go |