MatrixSynapse/synapse/storage
Erik Johnston c4fa4f37cb
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).
2021-08-27 09:15:50 +00:00
..
databases Fix perf of fetching the same events many times. (#10703) 2021-08-27 09:15:50 +00:00
engines Fix the inbound PDU metric (#10279) 2021-06-30 12:07:16 +01:00
schema Remove pushers when deleting 3pid from account (#10581) 2021-08-26 13:53:57 +01:00
util Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381) 2021-07-15 12:46:54 -04:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Remove unnecessary SystemRandom from SQLBaseStore (#9987) 2021-05-14 10:59:10 +01:00
background_updates.py Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381) 2021-07-15 12:46:54 -04:00
database.py Add support for MSC2716 marker events (#10498) 2021-08-04 12:07:57 -05:00
keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
persist_events.py Generics for `ObservableDeferred` (#10491) 2021-07-28 19:55:50 +00:00
prepare_database.py [pyupgrade] `synapse/` (#10348) 2021-07-19 15:28:05 +01:00
purge_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
relations.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
roommember.py Do not include rooms with an unknown room version in a sync response. (#10644) 2021-08-19 11:12:55 -04:00
state.py Add type hints to state handler. (#10482) 2021-07-26 12:49:53 -04:00
types.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00