forked-synapse/synapse/storage/databases/main
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
..
__init__.py Persist room hierarchy pagination sessions to the database. (#10613) 2021-08-24 08:14:03 -04:00
account_data.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
appservice.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
cache.py add a cache to have_seen_event (#9953) 2021-06-01 12:04:47 +01:00
censor_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
client_ips.py Remove keylen from LruCache. (#9993) 2021-05-24 14:02:01 +01:00
deviceinbox.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
devices.py Replace or_ignore in simple_insert with simple_upsert (#10442) 2021-07-22 12:39:50 +01:00
directory.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
e2e_room_keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
end_to_end_keys.py Fix could not serialize access errors for claim_e2e_one_time_keys (#10504) 2021-08-04 13:09:04 +01:00
event_federation.py Add support for MSC2716 marker events (#10498) 2021-08-04 12:07:57 -05:00
event_push_actions.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
events_bg_updates.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
events_forward_extremities.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
events_worker.py Fix perf of fetching the same events many times. (#10703) 2021-08-27 09:15:50 +00:00
events.py Add support for MSC2716 marker events (#10498) 2021-08-04 12:07:57 -05:00
filtering.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
group_server.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
keys.py Add missing type hints to synapse.util (#9982) 2021-05-24 15:32:01 -04:00
lock.py Fix dropping locks on shut down (#10433) 2021-07-20 14:24:25 +01:00
media_repository.py Add an admin API for unprotecting local media from quarantine (#10040) 2021-05-26 11:19:47 +01:00
metrics.py Add a new version of the R30 phone-home metric, which removes a false impression of retention given by the old R30 metric (#10332) 2021-07-19 16:11:34 +01:00
monthly_active_users.py Replace or_ignore in simple_insert with simple_upsert (#10442) 2021-07-22 12:39:50 +01:00
openid.py Convert additional databases to async/await part 2 (#8200) 2020-09-01 08:39:04 -04:00
presence.py Fix bug when running presence off master (#10149) 2021-06-11 10:27:12 +01:00
profile.py Fix deactivate a user if he does not have a profile (#10252) 2021-07-06 13:08:53 +01:00
purge_events.py Make backfill and get_missing_events use the same codepath (#10645) 2021-08-26 18:34:57 +01:00
push_rule.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
pusher.py Remove pushers when deleting 3pid from account (#10581) 2021-08-26 13:53:57 +01:00
receipts.py Combine LruCache.invalidate and invalidate_many (#9973) 2021-05-27 10:33:56 +01:00
registration.py Implement MSC3231: Token authenticated registration (#10142) 2021-08-21 22:14:43 +01:00
rejections.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
room.py Allow /createRoom to be run on workers (#10564) 2021-08-17 14:33:16 +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
search.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
session.py Persist room hierarchy pagination sessions to the database. (#10613) 2021-08-24 08:14:03 -04:00
signatures.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state_deltas.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state.py Make historical events discoverable from backfill for servers without any scrollback history (MSC2716) (#10245) 2021-07-28 10:46:37 -05:00
stats.py Add creation_ts to list users admin API (#10448) 2021-07-22 16:05:16 +02:00
stream.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
tags.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
transactions.py Replace or_ignore in simple_insert with simple_upsert (#10442) 2021-07-22 12:39:50 +01:00
ui_auth.py Implement MSC3231: Token authenticated registration (#10142) 2021-08-21 22:14:43 +01:00
user_directory.py Convert room member storage tuples to attrs. (#10629) 2021-08-18 09:22:07 -04:00
user_erasure_store.py Minor @cachedList enhancements (#9975) 2021-05-14 11:12:36 +01:00