Re: Why isn't it part of mutt "proper"
Hello Paul,
* Paul Walker <paul@xxxxxxxxxxxxxxxxxxxxx> [040819 01:19]:
> How long does each mutt hold the database read/write, anyway? As long
> as you have the "folder" open?
I answer this first. The database is opened rw or ro (fallback), during
the initial opening of the mailbox (eg. during the message counting).
> Out of interest, what's the behaviour if it opens it read-only, then new
> mail arrives?
Absolutly nothing. Mutt doesn't detect new maildir message arriving
during the initial open for a long time (search the archives for
details). But if it would, nothing would change.
They changed the behaviour, because mutt started the initial scan from
scratch. Eg. scan 20k messages (which takes a while) but the maildir
isn't open yet - oh a new message has arrived - start from scratch -
endless loop ...
Header Cache works the following:
- Is this message cached? If true and the cached message is
still up2date[1] read it out of cache, if false use the disk
file and write the header information to the cache, if we
opened the cache rw.
> Presumably some of the headers are found in the cache, while others
> are read as-before?
Correct. That happens each time you have many messages already read and
a new eMail arrives, you switch to the folder. All of the old messages
come from cache while the new (yet uncached one) is read from the file.
Thomas
[1] updatge means here:
Has the Charset changed? Has the SPAM include/exclude changed?
Is the diskfile newer than the cached one(optional)? Has the UID
VALIDTITY changed (IMAP). Has ImapHeaders Changed? Has the
internal Header Cache format changed (update/recompilation)? And
maybe other which doesn't come in my mind right now. But search
in hcache.c for crc32 and you're going to see.