matrix-org / pantalaimon

E2EE aware proxy daemon for matrix clients.
Apache License 2.0
288 stars 41 forks source link

Chunked downloads #149

Open codemonium opened 1 year ago

codemonium commented 1 year ago

Before this change, whenever the user would download an attachment, the client (Pantalaimon) would store all the data in memory while processing it. This causes significant memory usage spikes when downloading multiple large files at once. The high memory usage is a major problem when running Pantalaimon in a memory-constrained setting.

This change uses new matrix-nio functions to download and decrypt the attachments in chunks, which resolves the memory usage issues.

See also https://github.com/poljar/matrix-nio/pull/373