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

Re: fadvise WILLNEED for tokyocabinet header cache



On Tuesday, June 23 at 05:15 PM, quoth Rocco Rutte:
Yes, I see your point. The only thing I'm sure is that your guarantee shouldn't be generalized. :) What not sure about is whether we really want an option for it. Hacking this isn't exactly trivial either given that the current code of two pass maildir parsing.

What about using the mtime/ctime timestamp on the cur directory to determine whether it's changed since the last time it was read? All flag changes, message deliveries, etc. *should* update the directory's inode atime/ctime. That way you don't need a configuration knob, and it should be a generalized optimization that applies to all situations. It'd add a stat call to the opening process, and you'd have to store the last-known-mtime in the cache, but... for enormous cached maildirs it'd provide a big win (for efficiency, you'd probably want an update-able cache, rather than an append-only cache, but that's true in general).

~Kyle
--
Formal symbolic representation of qualitative entities is doomed to its rightful place of minor significance in a world where flowers and beautiful women abound.
                                                    -- Albert Einstein

Attachment: pgpFThgymoQw9.pgp
Description: PGP signature