Javamail performance

后端 未结 4 1426
南笙
南笙 2021-01-06 02:58

I\'ve been using javamail to retrieve mails from IMAP server (currently GMail). Javamail retrieves list of messages (only ids) in a particular folder from server very fast,

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-06 03:27

    I'm running into the same thing. After profiling, I noticed that getBody was being called every time I tried to do a message.getFrom() like you are, even though I was only accessing fields that should be covered by the Envelope flag. See https://java.net/projects/javamail/forums/forum/topics/107956-gimap-efficiency-when-only-reading-headers

提交回复
热议问题