[Imap-uw] ideas on improving efficiency of calls to mail_sort?
mrc at CAC.Washington.EDU
Thu Aug 18 21:35:26 PDT 2005
The c-client mailing list has been renamed to the imap-uw mailing list.
The fundamental problem is that your server does not implement the IMAP
SORT extension. You would not have this problem with a server that offers
Next, what options are you giving to mail_sort()? If you are setting
SE_UID, then the code does not (can not) do any prefetching. This is
because c-client's cache is completely implemented by message sequence
number, not by UID. In general, options such as SE_UID and FT_UID should
be avoided, especially when doing multiple message operations.
Instead, get the sequence numbers, and then afterwards translate them to
UIDs (if that is what you want) via mail_uid(). This may sound backwards
to someone who is thinking in terms of UIDs, but trust me, c-client cache
will be happier and will reward you for your cooperation.
You may find the use of sequence numbers to be beneficial in other ways as
well; use UIDs just for synchronization and do everything else with
sequence numbers. c-client will reward you for that as well.
-- Mark --
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
More information about the Imap-uw