element-hq / element-hq/synapse

Federation /event is slow for large rooms with non-shared history

Open
#8,554 0 comments 0 reactions 0 assignees View on GitHub
A-Messages-Endpoint A-Performance S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#8554](https://github.com/matrix-org/synapse/issues/8554).

---

This is because `filter_events_for_server` can't take the fast path of:

https://github.com/matrix-org/synapse/blob/921a3f8a59da0f8fe706a22627f464a74b54c992/synapse/visibility.py#L350-L366

and instead loads *all* members from the DB:

https://github.com/matrix-org/synapse/blob/921a3f8a59da0f8fe706a22627f464a74b54c992/synapse/visibility.py#L368-L378

This particularly effects rooms that are bridged to busy IRC channels

We often do `/event` after doing `/state_ids`, so #7893 is related.

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.