Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2997

hasAttachment SHOULD be metadata read level

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • None
    • None

    Description

      The description is well detailed in this mail : https://www.mail-archive.com/server-dev@james.apache.org/msg63511.html

      We are working on JMAP, and EMail::hasAttachments metadata is listed as
      a fast property.

      However to retrieve it today, we need to do a full message read in order
      to load attachment (as JMAP hasAttachment do not take inlined
      attachments into account and mailbox property do).

      Also, while inspecting the code, MessageResult::getLoadedAttachments is
      never used with attachment bytes. This means that given an email with a
      10 MB attachment, upon GetMessages call with full profile, we are going
      to read the full eml (10 MB) then load attachment bytes (10 MB) while
      the attachment could have not been loaded in the first place. In our
      little example we read 20MB while only 10 MB could have been necessary.

      This attachment over-reading results in both performance and cost issue
      on the object storage - what is the topic me, René and Duc are currently
      working on.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rcordier René Cordier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: