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

Re: recent header-cache changes?



Hi,

On Thu, Feb 09, 2006 at 04:53:39PM -0800, Brendan Cully wrote:
> On Thursday, 09 February 2006 at 10:18, Christoph Ludwig wrote:
> > after I rebuilt mutt from CVS, header caching didn't work anymore as it used
> > to. It turned out that I had to set the variable imap_cachedir for which I
> > could not find any documentation in the manual. On mutt-user, Kyle Wheeler
> > pointed me to some information in init.h, but I still have questions that
> > maybe Brendan can answer: 
> > 
> >  * How do imap_cachedir and header_cache interact? IIUC, caching of messages
> >    in an IMAP mailbox is a new feature that is supposed to speed up, e.g., 
> > the
> >    reading of messages. Why is opening an IMAP mailbox (with hcache enabled)
> >    significantly slower than before unless I set imap_cachedir?
> 
> You've got me there. imap_cachedir really doesn't interact with
> header_cache at all. It's simply a place to keep the full text of
> messages - basically a maildir without the locking semantics. So
> header_cache is useful on top of this in the same way that
> header_cache is useful for maildir.
> 
> I don't suppose you have any hooks or push macros that are doing
> header searches? I can't see why the header_cache should have slowed
> down since 1.5.11 (and it hasn't for me).

The following is the only hook I define:

  #
  # Make mutt delete mails older than N days in the specified folders
  # unless the thread is still active or it contains mails sent by or to me.
  #

  folder-hook '=Abo\..*' 'push 
<tag-pattern>~P|~p|~N|~F|~d<22d<enter><tag-pattern>~a<enter><delete-pattern>!~T<enter><untag-pattern>~T<enter><sync-mailbox>'

(This hook is the reason why I build mutt with the patch
1.5.6.nr.threadcomplete applied. I never bothered to check whether this patch
or its functionality has since been included into mainstream mutt.) 

IIUC, the hook does not access header fields that the header cache does not
store anyway. Besides, I use this hook at least as long as I use the header
cache; I'd therefore be surprised if it was responsible for the slow down I
observed.

> >  * Does mutt ever purge messages from the cache? (E.g., if I delete or move 
> > a
> >    message.) 
> 
> That's actually one of the new things that the header_cache does in
> CVS. It won't detect messages that you've removed with another client,
> but if you move/delete messages with mutt, it will clear them from the
> header and body caches.

That's good to know.

Thanks

Christoph

-- 
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany