element-hq / element-hq/synapse

SortedDict.values takes a lot of CPU

Open
#3,447 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.