MimeMessage.writeTo - performance problem in Applet
994350Mar 1 2013 — edited Mar 3 2013Dear All
I'm having a problem while using writeTo method for large mime messages in my applet. it takes at least 30 seconds for a 5MB of mime message.
OutputStream out = new FileOutputStream(new File("D:/test.eml"));
msg.writeTo(out);
my applet is signed and has no problem with accessing local disk and creating files on it.
I have also tried;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
msg.writeTo(baos);
nothing changed. writeTo always takes to much time in both ways.
but, if i try the same thing on a desktop application, everything is fine. for example, writeTo is completed in less than a second for a 8MB of mime message.
why does writing to outputstream in Applet take longer? is there anything i can do to improve the performance?
any advise would be appreciated, thank you very much