[PATCH 0/5] Fetch all message metadata in a single pass
authorAustin Clements <amdragon@MIT.EDU>
Thu, 9 Dec 2010 20:59:51 +0000 (15:59 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:39 +0000 (09:37 -0800)
95/c3d175f527c90f325c49ceca449751d7eaea85 [new file with mode: 0644]

diff --git a/95/c3d175f527c90f325c49ceca449751d7eaea85 b/95/c3d175f527c90f325c49ceca449751d7eaea85
new file mode 100644 (file)
index 0000000..2cbff9b
--- /dev/null
@@ -0,0 +1,71 @@
+Return-Path: <amthrax@awakening.csail.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5DB21431FB6\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Dec 2010 13:05:06 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id GmHR63m4ML7z for <notmuch@notmuchmail.org>;\r
+       Thu,  9 Dec 2010 13:05:06 -0800 (PST)\r
+X-Greylist: delayed 300 seconds by postgrey-1.32 at olra;\r
+       Thu, 09 Dec 2010 13:05:05 PST\r
+Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU\r
+       [18.9.25.15])\r
+       by olra.theworths.org (Postfix) with ESMTP id EB470431FB5\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Dec 2010 13:05:05 -0800 (PST)\r
+X-AuditID: 1209190f-b7c1dae000000a2b-02-4d0143551157\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-4.mit.edu (Symantec Brightmail Gateway) with\r
+       SMTP id 84.E2.02603.553410D4; Thu,  9 Dec 2010 16:00:05 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id oB9L04fO026394\r
+       for <notmuch@notmuchmail.org>; Thu, 9 Dec 2010 16:00:05 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id oB9L01RF009974\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)\r
+       for <notmuch@notmuchmail.org>; Thu, 9 Dec 2010 16:00:04 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)\r
+       (envelope-from <amthrax@awakening.csail.mit.edu>) id 1PQnar-0007Hg-S9\r
+       for notmuch@notmuchmail.org; Thu, 09 Dec 2010 16:00:01 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/5] Fetch all message metadata in a single pass\r
+Date: Thu,  9 Dec 2010 15:59:51 -0500\r
+Message-Id: <1291928396-27937-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.2.3\r
+X-Brightmail-Tracker: AAAAAA==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 09 Dec 2010 21:05:06 -0000\r
+\r
+This is the second of the two optimizations I described a while ago,\r
+and brings my inbox search down to 1.811 seconds, 2.5X faster than it\r
+was originally.\r
+\r
+This optimization is based on the observation that Xapian decompresses\r
+a document's term list every time you iterate over it.  As a result,\r
+notmuch can decompress the beginning of a single term list quite a few\r
+times.  This patch series combines all of this into a single pass that\r
+is only slightly more expensive than fetching one metadata field used\r
+to be, but offers a huge win in the common case where a message object\r
+is used for multiple metadata fields.\r
+\r