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.
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