You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today attachment are handled as mime parts, so if I download 5 attachments on the same mail I would need to read its full content 5 times, parse it then decode the attachment.
This is innefficient because we have a projection for attachments : it could be a simple download of that projection...
This mismatch leads to:
Needless reads on the objectStore (billed by cloud provider)
Unecessary parsing on James side, very likely a good proportion of the JMAP workload
What?
Allign the blob id on the JMAP layer with the attachment id on the mailbox layer
That way it's a direct download.
How?
Long term known issue.
I tend to look at it by the "JMAP layer needs to use mailbox attachmentId" but it was very complex and involved a lot of coupling.
After discussing with @HoussemNasri I believe that the other way around might be easier: "mailbox layer can be using JMAP blobId as an attachement Id"
To do this we could:
Put MessageStorer behind an interface (and rename it! AttachmentParser? )
Provide an EmailBodyPart backed version of it.
Add the attachmentId back into the ParsedAttachement and make message parser responsible of the allocation
Upon part downloads lookup the attachment first, then fallback to blob parts.
And realign the tests
Should be doable...
The text was updated successfully, but these errors were encountered:
Why?
Today attachment are handled as mime parts, so if I download 5 attachments on the same mail I would need to read its full content 5 times, parse it then decode the attachment.
This is innefficient because we have a projection for attachments : it could be a simple download of that projection...
This mismatch leads to:
What?
Allign the blob id on the JMAP layer with the attachment id on the mailbox layer
That way it's a direct download.
How?
Long term known issue.
I tend to look at it by the "JMAP layer needs to use mailbox attachmentId" but it was very complex and involved a lot of coupling.
After discussing with @HoussemNasri I believe that the other way around might be easier: "mailbox layer can be using JMAP blobId as an attachement Id"
To do this we could:
MessageStorer
behind an interface (and rename it!AttachmentParser
? )EmailBodyPart
backed version of it.Should be doable...
The text was updated successfully, but these errors were encountered: