Alright fine... well, first you didn't include the comparison... you
just said code X took Y minutes.
Here's why I can't see the point of running that code (and trying to
assign the blame to javamail). I wrote something that actually isolates
javamail creating a multipart message. (code below). I didn't have a
1.5 meg email sitting around, but I used a 450k email and it
consistently takes 1.7 seconds (on a 400mhz x86 still). Of course the
number of nested body parts and probably other factors vary
tremendously. 'nuff said.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
package com.lokitech;
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class Test {
public static void main(String arg[]) throws Exception {
long start = System.currentTimeMillis();
FileInputStream fin = new FileInputStream(arg[0]);
Session session = Session.getInstance (new Properties(),
null);
MimeMessage message = new MimeMessage(session, fin);
Object content = message.getContent();
if (content instanceof MimeMultipart) {
MimeMultipart mm = (MimeMultipart)content;
System.out.println ("it's multipart");
int nBodyParts = mm.getCount();
for (int i = 0; i < nBodyParts; i++) {
BodyPart part = mm.getBodyPart(i);
System.out.println ("filename=" +
part.getFileName());
}
}
System.out.println ("Took: " +
(System.currentTimeMillis() - start) + "ms");
}
}
Dino Fancellu wrote:
> You can't see the point?
>
> Once again, when I use my own mime-parsing code it does a 1.5 meg file in 40
> seconds when posted from my browser.
>
> When using the javax mine parsing it takes 5 minutes. That is the only
> difference between the two test cases. Is that not apparent?
>
> I just want to know if others get a slow result or not. There's no point in
> my investigating further until I can be sure
> that its not just some oddness with my setup.
>
> However, don't worry if its all too much for you, I'll just look elsewhere
> for answers, as its obvious that no one is really interested
> about my performance issues.
>
> Dino.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]