[dev] I/O hammering

Egan egan@sevenkings.net
Sat, 23 Jun 2001 00:38:39 -0400


On Tue,  5 Jun 2001 10:56:46 -0400, Chuck Hagenbuch <chuck@horde.org>
wrote:

>> It appears that dropping the BODY.PEEK from the request to omit those
>> fields from the return data would reduce the data volume of that one
>> request maybe 30-40%.
>
>We can't do that level of tweaking without modifying c-client.
>
>-chuck

I worked up some c-client patches and submitted them to the c-client
list.  Mark Crispin wrote to tell me he integrated them with imap-2001
development, which should be final RSN.



>On Mon, 18 Jun 2001 16:33:00 -0500, "Tom Warfield" wrote:
>
>>I have several users that are using IMP through a modem and there number one
>>complaint is that it is extremly slow.  What can i do about this?

The new c-client code makes it possible to significantly improve
interactive performance on a slow link, by eliminating much of the TCP
traffic which happens now.

There are four new c-client flags:

  FT_NOHDRS
  FT_NEEDBODY   (ignore the "internal use" comment in the .h file)

  SE_NOHDRS
  SE_NEEDBODY

FT_ flags are for fetches; SE_ flags are for searches.  Using SE_
flags with mail_search_full will be much more efficient than some of
the _fetch_ code we have now in php_imap.c.

NOHDRS will suppress the extra message headers we don't use.

But the greatest gain is NEEDBODY.  It will fetch the body structure
along with the envelopes in the initial request, eliminating the need
for individual fetches to get body structure for the icons.  Yay!

I hacked imap_fetch_overview() in php_imap.c to use the new c-client
flags with mail_search_full to get the message list, and the reduction
of TCP traffic was impressive.

Unfortunately, I'm out of time to work on this, so I can't take it
beyond the testing hacks I did.  Maybe I can get back to it in a few
months, but in the meantime, if anyone else wants it, be my guest ...


Egan