> Alright fine... well, first you didn't include the comparison... you
> just said code X took Y minutes.
In fact I did, I said "Using hand cranked code to parse the incoming stream
takes 40 seconds." in my first email.
> 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.
I never tried to blame javax.mail, I asked a question, hence the subject
line.
However thanks for the FileInputStream demo, that helped get me on the right
track.
That's all I ever wanted to see, someone else using the mime parsing and
getting good results.
Yes, your test runs very quickly, and I found that if I wrote the incoming
multipart/form data to a temporary file
first, then read from that file my code goes very quickly.
It must be some wierd buffering issue. I wrapped a BufferInputStream around
the ServletInputStream, but to no avail,
so for the moment writing it to a temp file then reading from their seems
the best.
I had a quick email from Bill Shannon at Sun about mime parsing and he said
"One of the areas we know is ripe for improvement is the MIME parsing code"
However this is all VERY good news for me, so now I can take file uploads,
even big files,
in a couple of seconds, and also be using javax.mail to do it for me,
instead of hand cranking it all.
Dino.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]