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

Re: Automated message processing



Hi,

* Kyle Wheeler wrote:
On Thursday, September  4 at 10:58 PM, quoth Peter Davis:
    ~i <id>

... or:

     grep '^Message-ID: <id>' *


Yes, but both of those require searching through a potentially large number of messages to find the matching id.

If you use hcache, the ~i pattern match will be just a hash-table lookup, which should be constant time no matter the number of messages.

Mutt internally maintains a hash table with message-ids for threading but for ~i this isn't considered. The reason is that ~i takes a regex as argument, and with hash tables you can't do range or partial matches or even regex matches, only exact string matches.

Mutt knows about some headers per message one of them being the message-id which is used for ~i. hcache doesn't play a role since mutt always has that header, i.e. ~i doesn't require a disk hit per message.

If you want to speed it up and your mutt is recent enough, you can use string instead of regex search if that is sufficient. I.e.

  =i foo.bar@xxxxxxxxxxx

should be way faster for a large folder compared to

  ~i foo.bar@xxxxxxxxxxx

Regards, Rocco