IMAP E-mail handling is inefficient.

XMLWordPrintable

    • 3.13
    • Severity 3 - Minor

      JIRA's Email handling is not very efficient when dealing with IMAP. We should fix. It appears that whenever you call the message.getContent() method on a IMAP message with string body (i.e. HTML or TEXT), JavaMail goes to the server and fetches it. JavaMail does not seem to cache the body. This means that code like:

      if (message.getContent() instanceof Multipart)
      {
      	final Multipart multipart = (Multipart) message.getContent();
      	final Collection changeItemBeans = handleMultipart(multipart, message, issue);
      	if ((changeItemBeans != null) && !changeItemBeans.isEmpty())
      	{
      		attachmentChangeItems.addAll(changeItemBeans);
      	}
      }
      

      actually calls the server twice for some non-Multipart parts. For my example, in my case we called the server 8 times to get the message body.

              Assignee:
              Unassigned
              Reporter:
              bain
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: