summary refs log tree commit diff
path: root/synmark
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-08-27 10:15:50 +0100
committerGitHub <noreply@github.com>2021-08-27 09:15:50 +0000
commitc4fa4f37cbc734f9cd6354a5f2661efc30d73cac (patch)
treecf10c0705a4d3f89fd6ed42b71c10bd230f96a94 /synmark
parentSplit `FederationHandler` in half (#10692) (diff)
downloadsynapse-c4fa4f37cbc734f9cd6354a5f2661efc30d73cac.tar.xz
Fix perf of fetching the same events many times. (#10703)
The code to deduplicate repeated fetches of the same set of events was
N^2 (over the number of events requested), which could lead to a process
being completely wedged.

The main fix is to deduplicate the returned deferreds so we only await
on a deferred once rather than many times. Seperately, when handling the
returned events from the defrered we only add the events we care about
to the event map to be returned (so that we don't pay the price of
inserting extraneous events into the dict).
Diffstat (limited to 'synmark')
0 files changed, 0 insertions, 0 deletions