10 Replies Latest reply: Mar 3, 2013 8:28 AM by baftos RSS

    MimeMessage.writeTo - performance problem in Applet

      Dear 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"));

      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();

      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