synapse-product/synapse/storage
Erik Johnston 0d1d3e0708
Speed up get_unread_event_push_actions_by_room (#13005)
Fixes #11887 hopefully.

The core change here is that `event_push_summary` now holds a summary of counts up until a much more recent point, meaning that the range of rows we need to count in `event_push_actions` is much smaller.

This needs two major changes:
1. When we get a receipt we need to recalculate `event_push_summary` rather than just delete it
2. The logic for deleting `event_push_actions` is now divorced from calculating `event_push_summary`.

In future it would be good to calculate `event_push_summary` while we persist a new event (it should just be a case of adding one to the relevant rows in `event_push_summary`), as that will further simplify the get counts logic and remove the need for us to periodically update `event_push_summary` in a background job.
2022-06-15 15:17:14 +00:00
..
controllers Faster joins: add issue links to the TODOs (#13004) 2022-06-09 10:13:03 +00:00
databases Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
engines Use dummy fallback engines if imports fail (#12979) 2022-06-07 17:33:55 +01:00
schema Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
util Wait for lazy join to complete when getting current state (#12872) 2022-06-01 16:02:53 +01:00
__init__.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
_base.py Reduce state pulled from DB due to sending typing and receipts over federation (#12964) 2022-06-06 16:46:11 +01:00
background_updates.py Replace noop background updates with DELETE. (#12954) 2022-06-13 14:06:27 -04:00
database.py Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
keys.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
prepare_database.py Use dummy fallback engines if imports fail (#12979) 2022-06-07 17:33:55 +01:00
push_rule.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 Faster joins: add issue links to the TODOs (#13004) 2022-06-09 10:13:03 +00:00
types.py Tidy up and type-hint the database engine modules (#12734) 2022-05-17 00:34:38 +01:00