diff options
author | Erik Johnston <erik@matrix.org> | 2021-08-27 10:15:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 09:15:50 +0000 |
commit | c4fa4f37cbc734f9cd6354a5f2661efc30d73cac (patch) | |
tree | cf10c0705a4d3f89fd6ed42b71c10bd230f96a94 /LICENSE | |
parent | Split `FederationHandler` in half (#10692) (diff) | |
download | synapse-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 'LICENSE')
0 files changed, 0 insertions, 0 deletions