Subject: [Imap-uw] ideas on improving efficiency of calls to mail_sort?

From: Andrew Biggs <[email-masked]>
Date: Fri, 19 Aug 2005 08:15:51 -0600

Hello,

I'm using the c-client library as part of a client application, and was
hoping for some advice on how I might change the way I'm using it to
improve performance.  Specifically, I've run into some slowdowns when I
use the mail_sort function to retrieve a sorted list of message UID's
from a large mailbox (several thousand messages).  What appears to be
happening is that the mail_sort is dutifully executing an IMAP search,
but subsequently calling what appears to be the equivalent of a
mail_fetchfast on each message individually:

0000000e SEARCH UNDELETED UNSEEN NOT (HEADER X-Priority 1)

* SEARCH 26 27 28 29 30 31 32 <...snipped over 1000 UID's ...>
1205 1206 1207 1208

0000000e OK SEARCH completed.

0000000f FETCH 26 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 26 FETCH (UID 46 INTERNALDATE "10-Aug-2005 21:33:47 -0600"
RFC822.SIZE 20687 FLAGS ())

0000000f OK FETCH completed.

00000010 FETCH 27 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 27 FETCH (UID 47 INTERNALDATE "10-Aug-2005 21:33:47 -0600"
RFC822.SIZE 20687 FLAGS ())

00000010 OK FETCH completed.

00000011 FETCH 28 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 28 FETCH (UID 48 INTERNALDATE "10-Aug-2005 21:33:48 -0600"
RFC822.SIZE 20685 FLAGS ())

00000011 OK FETCH completed.

00000012 FETCH 29 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 29 FETCH (UID 49 INTERNALDATE "10-Aug-2005 21:33:48 -0600"
RFC822.SIZE 20686 FLAGS ())

00000012 OK FETCH completed.

00000013 FETCH 30 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 30 FETCH (UID 50 INTERNALDATE "10-Aug-2005 21:33:48 -0600"
RFC822.SIZE 20687 FLAGS ())

00000013 OK FETCH completed.

00000014 FETCH 31 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 31 FETCH (UID 51 INTERNALDATE "10-Aug-2005 21:33:48 -0600"
RFC822.SIZE 20687 FLAGS ())

00000014 OK FETCH completed.

00000015 FETCH 32 (UID INTERNALDATE RFC822.SIZE FLAGS)

* 32 FETCH (UID 52 INTERNALDATE "10-Aug-2005 21:33:48 -0600"
RFC822.SIZE 20687 FLAGS ())

00000015 OK FETCH completed.

<... etc etc ...>

Any suggestions or advice on other calls or perhaps different cache
settings I could try to speed this up a bit?  I figure there must be
some way to either pre-fetch the internaldate (which I'm sorting on) or
at least batch the fetch calls up somehow.

Thanks!

Andrew

_______________________________________________
Imap-uw mailing list
[email-masked]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw