element-hq / element-hq/synapse
`/messages` takes ages to back-paginate through private history visibility
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13128](https://github.com/matrix-org/synapse/issues/13128).
---
If you join a room with `joined` history visibility, then your client will attempt to backfill history. Synapse does the following:
* loads a batch of events from the db
* filters out the ones you can't see (ie, all of them)
* returns the remainder
So the result looks like this:
```json
{
"chunk": [],
"start": "t23104-3060236712_757284974_3318886_1437115222_1456937831_3359724_521254283_4632180264_0",
"end": "t23085-659955750_757284974_3318886_1437115222_1456937831_3359724_521254283_4632180264_0"
}
```
If the history is long, this can go on for ages (like, hours) before we reach the actual start of the room.
Contributor guide
Assessment
This issue has not been assessed yet.