lkml.org 
[lkml]   [2008]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Very slow header cache in mutt if the maildir is on ext3
On Wed, Dec 17, 2008 at 07:32:04 -0500, Theodore Tso wrote:

[...]

> I just checked mutt 1.5.17 in Ubunty Hardy, and it sorts the inodes
> even if maildir_header_cache_verify is unset. (It sorts it earlier if
> that option is set, but a little later in the function, if it wasn't
> sorted earlier, it sorts it then.) Check for calls to maildir_sort()
> that use md_cmp_inode(); in my version of mutt, there are two such
> calls in mh.c:maildir_delayed_parsing().

I checked maildir_sort(), and it wasn't called with
maildir_header_cache_verify unset. In the source, it looks like this:

#if USE_HCACHE
if (option(OPTHCACHEVERIFY))
{
DO_SORT();
ret = stat(fn, &lastchanged);
}

...

if (ctx->magic == M_MH)
data = mutt_hcache_fetch (hc, p->h->path, strlen);
else
data = mutt_hcache_fetch (hc, p->h->path + 3, &maildir_hcache_keylen);

...

#endif /* USE_HCACHE */

DO_SORT();

So DO_SORT() is called _after_ reading the header cache if
maildir_header_cache_verify is unset, which is too late, because the
hard disk seeks to death if the cache is read with the unsorted inode
list.

Regards,
Tino


\
 
 \ /
  Last update: 2008-12-17 17:19    [W:0.222 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site