[dev] I/O hammering (was: imp folder prefix)

Egan egan@sevenkings.net
Wed, 30 May 2001 19:13:20 -0400


On Wed, 30 May 2001 16:33:41 -0400, Chuck Hagenbuch <chuck@horde.org>
wrote:

>imap_fetchstructure _is_ what asks for BODYSTRUCTURE.

I see.


>We can't make imap_fetch_overview() ask for BODYSTRUCTURE without
>modifying c-client. Which isn't an acceptable requirement.

Hmmm ... I also see that:

  a) imap_fetchstructure has a call to mail_fetchstructure_full, and

  b) in c-client's mail.h, that call to mail_fetchstructure_full is
#defined to mail_fetch_structure

  c) imap_fetch_overview has a call to mail_fetch_structure


So they are both the same c-client call; the only difference between
them is that one has a *body argument, and the other does not.

imap_fetch_overview has a for loop which calls mail_fetch_strucuture
for each message in the sequence.  Right now, it only passes arguments
for the stream and the message number, but we can change it to also
pass a *body argument, conditioned upon a flags value of FT_STRUCTURE
or something like that.

We don't need to return any objects containing the message structure,
like imap_fetchsturcture does, we just need to peek at the data to see
whether we want to set the icon or not, and define another property
which indicates that.

This is just some idea I got from looking at the code for a while.
Maybe I am overlooking some obstacle that would make it too hard.  But
if it is feasible, we could build the message list without any need
for looping in IMP.


Egan