Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-17022

IMAP E-mail handling is inefficient.

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbain bain
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: