Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
3.13
-
3.13
-
Severity 3 - Minor
-
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.