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

Opening emails with large attachments is slow #13

Open
OJFord opened this issue Jul 10, 2022 · 0 comments
Open

Opening emails with large attachments is slow #13

OJFord opened this issue Jul 10, 2022 · 0 comments
Labels
component/client type/bug Something isn't working

Comments

@OJFord
Copy link
Owner

OJFord commented Jul 10, 2022

Currently the whole email, including attachment content, is loaded on selecting the email. This makes that very slow (so no email headers or body visible) when it has large attachment(s).

(Actually, a lot slower than I would expect it to be, given there's no network involved, but that's not the point.)

Attachment content should load asynchronously (if deferred to opening the attachment, that would be slow) and not delay the rendering of the email body.

This is a lot more complex than it sounds, since in order to find either the body or possible attachments, we have to parse the email; so this requires either that the 'read body' API abort early, or some asynchronous parsing of the whole thing into an object read by synchronous methods that just block on their respective field being filled.

Note also that off the top of my head, I don't think the body (inline parts) are required to strictly precede attachments. So worst case, this offers no improvement. (We could scan the whole thing looking for part start locations quickly I suppose? Not sure that's worth it. Perhaps examine real-world examples to see how often that would help significantly.)

@OJFord OJFord added component/client type/bug Something isn't working labels Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/client type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant