element-hq / element-hq/synapse
High DB usage on pusher processes
Open
A-Push
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
Sometimes our pusher workers spend a period of time hammering the database via `get_unread_counts_by_room_for_user`.
I believe https://github.com/element-hq/synapse/pull/16756 was an attempt to improve it, but that got reverted in https://github.com/element-hq/synapse/pull/16979.
Per https://github.com/matrix-org/matrix-spec-proposals/pull/4076, we should give apps a way to opt-out of receiving the badge counts, because it's usually wrong and isn't necessary.
Per https://github.com/matrix-org/matrix-spec/issues/644, what we return isn't correct according to the spec, anyway.
Contributor guide
Assessment
This issue has not been assessed yet.