From: Timo Sirainen Date: Wed, 2 Jul 2008 06:44:30 +0000 (+0300) Subject: Updated thread index documentation. X-Git-Tag: 1.2.alpha1~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f535f1db73d086cc6ac929ba478a90b2989427a;p=thirdparty%2Fdovecot%2Fcore.git Updated thread index documentation. --HG-- branch : HEAD --- diff --git a/doc/thread-refs.txt b/doc/thread-refs.txt index 72571c58b6..055278331d 100644 --- a/doc/thread-refs.txt +++ b/doc/thread-refs.txt @@ -9,13 +9,14 @@ as when building a new tree from scratch. Expunging messages gets more problematic though. Each node in the tree keeps a "link reference count" which specifies how -many messages contain a "this message" -> "parent message" reference. The -first reference is usually added by the message's own References: or -In-Reply-To: header and the latter references are added by References: -headers. This link refcount must be updated when adding and expunging -messages. When the link refcount drops to zero, the message becomes a root. -The link refcount doesn't tell much about the number of children the node -has, because References: headers may reference any number of its ancestors. +many messages contain a "this message" -> "parent message" reference +(number of links to parent node). The first reference is usually added by +the message's own References: or In-Reply-To: header and the latter +references are added by References: headers. This link refcount must be +updated when adding and expunging messages. When the link refcount drops to +zero, the message becomes a root. The link refcount doesn't tell much about +the number of children the node has, because References: headers may +reference any number of its ancestors. The optimistic approach assumes that usually there are no problematic links. In such case expunging a message simply updates the link refcounts @@ -138,8 +139,8 @@ thread_add_msg(uid) link_reference(nodes[parent_msgid], node) // go through References (skipping the last one) - for (parent_msgid, child_msgid) in references - link_reference(nodes[parent_msgid], nodes[child_msgid]) + for (ref_parent, ref_child) in references + link_reference(nodes[ref_parent], nodes[ref_child]) unref_link(parent, child) if parent.parent_unref_rebuilds