synapse-old/synapse
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
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api Merge branch 'master' into develop 2021-08-24 17:13:29 +01:00
app Persist room hierarchy pagination sessions to the database. (#10613) 2021-08-24 08:14:03 -04:00
appservice Use inline type hints in various other places (in `synapse/`) (#10380) 2021-07-15 11:02:43 +01:00
config Merge branch 'master' into develop 2021-08-24 17:13:29 +01:00
crypto Use inline type hints in various other places (in `synapse/`) (#10380) 2021-07-15 11:02:43 +01:00
events Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
federation Split `FederationHandler` in half (#10692) 2021-08-26 21:41:44 +01:00
groups Use inline type hints in various other places (in `synapse/`) (#10380) 2021-07-15 11:02:43 +01:00
handlers Split `FederationHandler` in half (#10692) 2021-08-26 21:41:44 +01:00
http Additional type hints for the proxy agent and SRV resolver modules. (#10608) 2021-08-18 13:53:20 -04:00
logging Fix PeriodicallyFlushingMemoryHandler inhibiting application shutdown (#10517) 2021-08-03 14:28:30 +01:00
metrics [pyupgrade] `synapse/` (#10348) 2021-07-19 15:28:05 +01:00
module_api Merge branch 'release-v1.41' into develop 2021-08-18 17:02:47 +01:00
push Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
replication Split `FederationHandler` in half (#10692) 2021-08-26 21:41:44 +01:00
res/templates Implement MSC3231: Token authenticated registration (#10142) 2021-08-21 22:14:43 +01:00
rest Additional type hints for REST servlets (part 2). (#10674) 2021-08-26 11:53:52 +00:00
server_notices Use inline type hints in various other places (in `synapse/`) (#10380) 2021-07-15 11:02:43 +01:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Add type hints to state handler. (#10482) 2021-07-26 12:49:53 -04:00
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage Fix perf of fetching the same events many times. (#10703) 2021-08-27 09:15:50 +00:00
streams Add a return type to parse_string. (#10438) 2021-07-21 09:47:56 -04:00
util Manhole: wrap coroutines in `defer.ensureDeferred` automatically (#10602) 2021-08-16 18:11:48 +01:00
__init__.py 1.41.0 2021-08-24 15:31:55 +01:00
event_auth.py Support MSC3289: Room version 8 (#10449) 2021-08-09 10:46:39 +02:00
notifier.py Generics for `ObservableDeferred` (#10491) 2021-07-28 19:55:50 +00:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Split `FederationHandler` in half (#10692) 2021-08-26 21:41:44 +01:00
types.py Add `get_userinfo_by_id` method to `ModuleApi` (#9581) 2021-08-04 10:40:25 +00:00
visibility.py [pyupgrade] `synapse/` (#10348) 2021-07-19 15:28:05 +01:00