element-hq / element-hq/synapse

Media repository reads files from disk on the main thread.

Open
#9,312 0 comments 0 reactions 0 assignees View on GitHub
T-Task
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

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

---

It does use [`FileSender`](https://twistedmatrix.com/documents/current/api/twisted.protocols.basic.FileSender.html), which reads the file in chunks and so shouldn't be *too* slow, but nonetheless there is potential for disk I/O to take a long time (especially with networked storage).

We should look into either a) doing async file I/O (though that is likely hard) or b) do the reads from a thread.

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.