0

I'm writing an email listner (inbox) using javamail and I would like to know if there is some method to increase the speed for saving attachments.

These are my tests:

  1. using a small buffer (2k/4k)
  2. using a big buffer (1mb)
  3. increasing of java heap memory of jvm

all the previous test have the same peformance, it takes approximatively 6/7 minutes to save an attachment (pdf) of 7mb.

can you suggest me some more performant method to increase the speed?

Shawn Chin
  • 84,080
  • 19
  • 162
  • 191
piojo
  • 183
  • 3
  • 4
  • 10

1 Answers1

0

Which protocol are you working with? IMAP? POP? IMAP over SSL?

Also, which server are you aiming? Gmail? And which platform are you running your listener on? There is always the possibility that the servers imposes a limit (hence there is not much you could do).

If you are working with an SSL protocol, you should make sure you have proper security settings (for Unix/Linux platforms, see answer to JavaMail IMAP over SSL quite slow - Bulk fetching multiple messages).

Community
  • 1
  • 1
Justmaker
  • 1,261
  • 2
  • 11
  • 20