back: Mail::Box::Threads
next: Mail::Box Next Generation -1

The disadvantage of delay-loading is that not all information is studied when you do not need it. Until now, I only discussed delay-loading of the body of a message which is common for Mbox-like folders. When you think about MH- and IMAP-folders, you will need delay-loading on the message-headers too! Even more delayed.

To find messages related in discussion-threads, you have to get the message-ids of the messages found in the folder. If you need all message-ids of an MH folder, you need to parse all files. This is unacceptable, and one of the reasons why many mail-user agents to not implement threaded-reading.

The trick of Mail::Box is to collect all message-ids from parsed headers. Then, when the thread of a certain message is requested, the folder is scanned from back to front (from most recent to the oldest), until

  1. all referred message-ids are found, or
  2. a certain threshold in time is reached (don't go further back than two days), or
  3. a certain amount of messages is scanned.
Everything is tunable (of course).

Mail::Box::Threads Mail::Box Next Generation -1

Created by Mark Overmeer with PPresenter on 11 July 2001