<<< Date Index >>>     <<< Thread Index >>>

Re: Fetching entire message for index page



On Sat, Nov 15, 2003 at 09:52:52AM -0500, Allister MacLeod wrote:
> On Fri, Nov 14, 2003 at 06:31:37AM -0800, moseley@xxxxxxxx wrote:
> > I check headers in messages to see if my address is mentioned.  For
> > example:
> > color index       yellow  black "~x hank\.org"   # References
> > color index       green black "~i hank\.org"     # Message ID
> > color index       blue  black "~h In-Reply-To:.*hank\.org
> > The problem is I'm using imap over the network and those checks causes the
> > entire message to be fetched (which is a pain on a slow link with lots
> > of messages with large binary attachments).
> 
> As Michelle said, none of the patterns you mention should cause the
> entire message to be fetched.  It should just grab the header.  If you
> were using something else like ~b or ~B, then it would have to fetch
> the body too.  

I just emailed myself a message with about a 6MB attachement.  I then 
commented out these three:

#color index       yellow  black "~x hank\.org"   # References
#color index       green black "~i hank\.org"     # Message ID
#color index       blue  black "~h In-Reply-To:.*hank\.org

and opened the mail folder.  There was no delay.  

Then I uncommented one at a time and opened mutt.  When I uncommented
the last one it delays at the big message.  So it seems as if it's the 
~h.  Is it possible that ~h fetches the entire message to look at the 
multipart message sections?

> > Is it a limiation of imap that the entire message must be fetched?  
> 
> Negative.  IMAP specifies ways to retreive specific portions of a
> message, if I remember correctly.  I have not delved mutt's IMAP code
> in sufficient depth to know how much mutt is able to benefit from this
> potential.  Still, if you're matching on the body, it'll need to get
> the whole body anyway, and if not, it should only need the headers.

Nope, I'm not using ~b.

> 
> It might be worth doing some debugging, to see what IMAP commands are
> actually being issued, and where the time is being taken up.

Yes, I agree.  Anyone know the best way to log that?


-- 
Bill Moseley
moseley@xxxxxxxx