Re: [Evolution-hackers] inefficient POP3 handling
- From: Not Zed <notzed ximian com>
- To: Lee Revell <rlrevell joe-job com>
- Cc: Evolution Hackers <evolution-hackers lists ximian com>
- Subject: Re: [Evolution-hackers] inefficient POP3 handling
- Date: Tue, 19 Apr 2005 18:05:51 +0800
I really don't think it is that much of a hit. If you have no mail, big
deal. If the test fails - so what, the state is lost as soon as you
disconnect, so the inaccurate 'uidl not supported' isn't used. If you
do have mail, it wont be much overhead.
And, if a server is wrongly assumed to not have uidl because it doesn't
support capa, then the performance hit is massive.
On Sat, 2005-04-16 at 16:28 -0400, Lee Revell wrote:
> I think Evo's POP3 handling could be more efficient.
>
> The server in these two examples is qmail pop3d.
>
>
> 1. Popping an empty mailbox:
> ----------------------------
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_LINE(46): '+OK <21677 1113679229 mustang oldcity dca net>'
> POP3_STREAM_WRITE(6):
> CAPA
>
> POP3_STREAM_LINE(24): '-ERR authorization first'
> POP3_STREAM_WRITE(27):
> USER rlrevell joe-job com
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_WRITE(15):
> PASS xxxxxxxx
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_WRITE(6):
> CAPA
>
> POP3_STREAM_LINE(18): '-ERR unimplemented'
> POP3_STREAM_WRITE(8):
> UIDL 1
>
> POP3_STREAM_LINE(27): '-ERR not that many messages'
> POP3_STREAM_WRITE(6):
> LIST
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_LINE(END)
> POP3_STREAM_WRITE(6):
> QUIT
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
>
>
> 2. Popping a non-empty mailbox:
> -------------------------------
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_LINE(46): '+OK <20440 1113679049 mustang oldcity dca net>'
> POP3_STREAM_WRITE(6):
> CAPA
>
> POP3_STREAM_LINE(24): '-ERR authorization first'
> POP3_STREAM_WRITE(27):
> USER rlrevell joe-job com
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_WRITE(15):
> PASS xxxxxxxx
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_WRITE(6):
> CAPA
>
> POP3_STREAM_LINE(18): '-ERR unimplemented'
> POP3_STREAM_WRITE(8):
> UIDL 1
>
> POP3_STREAM_LINE(46): '+OK 1 1113679025.20292.mustang.oldcity.dca.net'
> Got + response
> POP3_STREAM_WRITE(6):
> LIST
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response"-ERR not that many messages
>
> POP3_STREAM_LINE(6): '1 2075'
> POP3_STREAM_LINE(END)
> POP3_STREAM_WRITE(6):
> UIDL
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_LINE(42): '1 1113679025.20292.mustang.oldcity.dca.net'
> POP3_STREAM_LINE(END)
> POP3_STREAM_WRITE(8):
> RETR 1
>
> POP3_STREAM_LINE(4): '+OK '
> Got + response
> POP3_STREAM_READ(2048):
> Return-Path: <alsa-cvslog-admin lists sourceforge net>
> ...etc
>
> AFAICT we do 'UIDL 1' first to probe for UIDL support. According to the
> RFCs, '-ERR not that many messages' cannot be reliably distinguished
> from '-ERR unimplemented'.
>
> If this is the case then we can just do UIDL then LIST, so the UIDL 1 in
> the second case is redundant.
>
> OTOH, if we are allowed to interpret '-ERR not that many messages' and
> '-ERR unimplemented' as such, then the LIST in the first case is
> redundant as UIDL 1 told us there are no messages.
>
> Regarding LIST, presumably the only reason we do it at all if we have
> UIDL is to make sure we don't download a message that we don't have room
> to save to disk. AFAICT if UIDL works then we can just STAT the mailbox
> and skip the LIST if the total size isn't a problem, then RETR the
> message numbers from UIDL.
>
> Lee
>
> _______________________________________________
> evolution-hackers maillist - evolution-hackers lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]