mirror of https://github.com/watcha-fr/synapse
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).code_spécifique_watcha
parent
1800aabfc2
commit
c4fa4f37cb
@ -0,0 +1 @@ |
||||
Fix a regression introduced in v1.41.0 which affected the performance of concurrent fetches of large sets of events, in extreme cases causing the process to hang. |
Loading…
Reference in new issue