Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive memory usage with attachments #1602

Open
dup2 opened this issue Feb 13, 2024 · 0 comments
Open

Excessive memory usage with attachments #1602

dup2 opened this issue Feb 13, 2024 · 0 comments

Comments

@dup2
Copy link

dup2 commented Feb 13, 2024

Hi all

When using the library to parse a existing message with messsage = Mail.read("test.eml") and then accessing the parts or attachments objects like mesage.parts.size or message.attachments.size we see excessive memory usage.

It seems like the attachments are being held fully in memory - the memory usage is very high.
For example with a message having a single attachment, originally 110 MB in size, base64-encoded in the message and thus the total size of the message coming up to 150 MB we see a overhead of memory usage of about factor two - the simple example above uses about 380 MB of memory.

Is there any option to parse a message without loading everything into memory upfront? Like in a streaming fashion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant