james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: [IMAP] MessageResult += Content
Date Mon, 05 Nov 2007 08:40:34 GMT
On Nov 4, 2007 11:30 PM, Stefano Bagnara <apache@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
> >> I've not even investigated this option, but before thinking what the
> >> real problems could be I want to be sure I'm understanding what you propose!
> >
> > messages are typically read more often than they are written. unless
> > the API is able to offer some gaurantees about the output, it is
> > forced to assume the worse.
> >
> > in practice, this implies re-parsing and re-encoding the complete
> > message each time any information needs to be read. the code which
> > took this approach is too slow and uses too much memory to be
> > reasonably usable even on a quick machine. (several minutes to open a
> > new mailbox on my AMD64 with 1G RAM allocated to JAMES.)
>
> In SMTP and POP3 this is not a real issue. I don't know IMAP too much.
> Is it a common case that a message content is read over and over again?
> I thought that most things was cached on the client side and read very
> few times from the server. Is this a wrong assumption?

in theory, that's correct. in practice, though, it's not quite so easy.

typically, IMAP clients write message body content very rarely - it's
mainly a reading protocol. IMAP clients try to read body content only
once. IMAP clients write meta-data often and read meta-data very
frequently. this meta-data refers to the correctly encoded MIME form
of the message.

IMAP clients typically read all text messages they haven't seen in a
mailbox (MIME messages are typically only read on display). opening a
mailbox for the first time (or one which has not been opened in a long
while) means reading a lot of mail. if reading each mail takes (on
average) 6 seconds (say) then a moderately sized mailbox with 100
messages will take 10 minutes which is far too long to be usable.

in order to create a usable IMAP server, reading meta-data must be
very fast and reading normal (non-MIME) mail fast. to create an IMAP
server which will run on a machine of moderate power, meta-data
reading and normal message reading must not consume a lot of memory.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message