element-hq / element-hq/synapse
SortedDict.values takes a lot of CPU
Open
A-Performance
O-Occasional
S-Minor
T-Defect
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 46
Description
This issue has been migrated from [#3447](https://github.com/matrix-org/synapse/issues/3447).
---
At times the method takes ~35% on the matrix.org synchrotrons, mainly from the `StreamChangeCache`:
https://github.com/matrix-org/synapse/blob/f7869f8f8b5a9817fde250c8c9dd44869e50a796/synapse/util/caches/stream_change_cache.py#L81
and
https://github.com/matrix-org/synapse/blob/f7869f8f8b5a9817fde250c8c9dd44869e50a796/synapse/util/caches/stream_change_cache.py#L116
Contributor guide
Assessment
This issue has not been assessed yet.