-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
For a while ago i sent a mail about binc being slow when FETCH BODY is used to
fetch various headers of a mail. It was dated 02/24 and the subject was "Re:
[bincimap] 1.0.24-1 - bugfixes and cleanups". I didn't really get any
response to it.
Summary of the problem:
When binc is being used from a webserver for instance in a webmail solution
the connection between client (the webserver) and server (binc) is being
opened and closed all the time. Therefore information that usually would be
cached in memory in binc (the messagedepot) is of no use.
An example:
I want to check for the number of unread messages in the inbox. This is done
once every minute for all online users. For that i use the php function
"imap_mailboxmsginfo". That results in the following communication between
webserver and binc (only interesting part is shown):
00000003 SELECT INBOX
* 181 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1044969363]
* OK [UIDNEXT 480]
* FLAGS (\Answered \Flagged \Deleted \Recent \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] Limited
00000003 OK [READ-WRITE] SELECT completed
00000004 FETCH 1,2:21 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (Path Message-ID
Content-MD5 Content-Disposition Content-Language Content-Location Newsgroups
Followup-To References)] INTERNALDATE RFC822.SIZE FLAGS)
* 1 FETCH (UID 76 ENVELOPE ("5 Feb 2003 07:54:26 -0000" "test" (("Thomas
Petersen" NIL "thomas" "mendo.dk")) NIL NIL ((NIL NIL "tp" "esoft.dk")) NIL
NIL "" "<[EMAIL PROTECTED]>") BODY[HEADER.FIELDS (Path
Message-ID Content-MD5 Content-Disposition Content-Language Content-Location
Newsgroups Followup-To References)] {71}
Message-ID: <[EMAIL PROTECTED]>
References:
INTERNALDATE "11-Feb-2003 12:28:51 +0100" RFC822.SIZE 675 FLAGS (\Seen))
* 2 FETCH (UID 85 ENVELOPE ("Tue, 04 Feb 2003 14:50:16 +0100" "test" (("Thomas
Petersen" NIL "tp" "esoft.dk")) NIL NIL ((NIL NIL "tp" "esoft.dk")) NIL NIL
NIL "<[EMAIL PROTECTED]>") BODY[HEADER.FIELDS (Path Message-ID
Content-MD5 Content-Disposition Content-Language Content-Location Newsgroups
Followup-To References)] {43}
Message-ID: <[EMAIL PROTECTED]>
INTERNALDATE "11-Feb-2003 12:30:11 +0100" RFC822.SIZE 593 FLAGS (\Seen))
With the current implementation of FETCH BODY each and every message in the
maibox is fully parsed even though it really isn't necessary. With my patch
applied (see other mail) only the headers is parsed in this case or at least
the messages is only fully parsed the first time because of the RFC822.SIZE
but that one is cached in a file so that's no problem.
Ofcourse there is other solutions to the problem. One other sollution could be
to cache all the information about a mail (the whole bodystructure) just like
the message size but i think that would be a bit harder to achieve.
Anyway no matter what the sollution is i think it's important to do something
about it. It might not be a very big problem when binc is used with a
standard mailreader like mozilla, kmail or something like that but when used
as backend for webmail it's a very big problem.
In my situation the difference is that a mailbox that would take 1 minute to
check for unread mail only take about 1 second with the patch applied.
- --
Thomas Petersen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Zy/BgrueCKj7oXMRArWeAKDLBPjmoAdlAoQ9z6MisSfpXFnzwACcCJAa
PXNtwFhbKoI7MhMTMN8SbJA=
=iSvo
-----END PGP SIGNATURE-----