----- Original Message -----
From: "Danny Angus" <[EMAIL PROTECTED]>


> > I agree with your observation about the extra load from using
MimeMessage.
> > But where/how do you want to remove the usage of MimeMessage, and what
> > alternate approach would you use?  Maybe add an extra method on
> > MailImpl to
> > retrieve the message header/body data as a stream?
>
> I don't understand why any of the core features of James need to access
any
> of the Mime information fo the messages, surely headers and body are all
> that James shoudl be interested in?
>
> If someone can help me understand what parts, and why, then I could
perhaps
> suggest how to avoid it, I'll take a look later.

I agree it's counterproductive to break messages into parts.  Breaking it
into parts just causes the extra overhead, and there's really nothing in
James (except certain mailets) that would benefit from this.

The change I'm thinking is to give someone to get an inputstream of the
message data, without instantiating it as a MimeMessage.  Right now the way
things are coded, you have to instantiate the MimeMessage before you can get
an inputstream to the data.  This makes POP3 very slow because even if you
want only the top 10 lines, you read the entire message into memory, parse
it as a MimeMessage, and then print the top 10 lines.

There already is a "JamesMimeMessage" object used throughout James that
tries to avoid loading the MimeMessage object unless needed, so hopefully I
can change it so that getInputStream returns the raw stream rather
instantiating the message and then returning an input stream to that.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to