element-hq / element-hq/synapse
Add logging to determine the source of slow database transactions
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13964](https://github.com/matrix-org/synapse/issues/13964).
---
As a part of the [work](https://github.com/matrix-org/synapse/issues/13965) to speed up local room joins, I have been tracing joins to #synapse-dev on matrix.org, and noticed that in the slower traces there are database transactions that seem to have paused, or are spending a large and unusual amount of time where it would not be expected, eg:

Add logging to get more insight into where the time is going in these cases.
Contributor guide
Research direction
Start by tracing the database transactions involved in the local room join work and compare the slower traces described in the issue. Add logging that identifies where unusually long pauses or unexpected transaction time are spent; done means the logs reveal the source of the slow segments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100