Re: [PATCH v2] new: Don't scan unchanged directories with no sub-directories
authorDavid Bremner <david@tethera.net>
Sat, 26 Oct 2013 11:52:55 +0000 (08:52 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:39 +0000 (09:57 -0800)
26/22a2c1d724d668ff54076ceccddfd5e984c978 [new file with mode: 0644]

diff --git a/26/22a2c1d724d668ff54076ceccddfd5e984c978 b/26/22a2c1d724d668ff54076ceccddfd5e984c978
new file mode 100644 (file)
index 0000000..d3c0d79
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <david@tethera.net>\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 59331431FC3\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 04:53:08 -0700 (PDT)\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 0bYgEviHdqwg for <notmuch@notmuchmail.org>;\r
+       Sat, 26 Oct 2013 04:53:03 -0700 (PDT)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E6E4D431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 04:53:03 -0700 (PDT)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <david@tethera.net>)\r
+       id 1Va2QO-0003dQ-E0; Sat, 26 Oct 2013 08:53:00 -0300\r
+Received: (nullmailer pid 25778 invoked by uid 1000); Sat, 26 Oct 2013\r
+       11:52:55 -0000\r
+From: David Bremner <david@tethera.net>\r
+Newsgroups: \r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2] new: Don't scan unchanged directories with no\r
+       sub-directories\r
+In-Reply-To: <878uxgvqh2.fsf@zancas.localnet>\r
+References: <20131024210837.GH20337@mit.edu>\r
+       <1382650739-12438-1-git-send-email-amdragon@mit.edu>\r
+       <878uxgvqh2.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.16+97~g6878b0b (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sat, 26 Oct 2013 08:52:55 -0300\r
+Message-ID: <87vc0ktfjc.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/mixed; boundary="=-=-="\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: Sat, 26 Oct 2013 11:53:08 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+David Bremner <david@tethera.net> writes:\r
+\r
+> Austin Clements <amdragon@MIT.EDU> writes:\r
+>\r
+>> This can substantially reduce the cost of notmuch new in some\r
+>> situations, such as when the file system cache is cold or when the\r
+>> Maildir is on NFS.\r
+>\r
+> On my desktop at home (a core i7 950) with spinning rust disks (and lvm\r
+> on luks) this patch yields about a 7% slowdown in the intial new perf\r
+> test\r
+>\r
+> from\r
+>\r
+>                      Wall(s) Usr(s)  Sys(s)  Res(K)  In/Out(512B)\r
+>   Initial notmuch new   579.60       348.86  14.26   217188  5330266/3501272\r
+>\r
+> to\r
+>\r
+>                      Wall(s) Usr(s)  Sys(s)  Res(K)  In/Out(512B)\r
+>   Initial notmuch new   620.51       368.62  15.48   217156  5330354/3416456\r
+>\r
+> On an SSD I don't detect a significant different (<0.5% speedup)\r
+\r
+Seems like a false alarm. Averaging over 10 repetitions, the patched\r
+version is about 1% faster. Unfortunately it points out that our\r
+performance test suite should really do more than one repetition for\r
+each test.\r
+\r
+\r
+--=-=-=\r
+Content-Type: text/x-sh\r
+Content-Disposition: inline; filename=crunch.sh\r
+\r
+#!/bin/bash\r
+\r
+test_description='notmuch new'\r
+\r
+. ./perf-test-lib.sh\r
+\r
+time_start\r
+for i in $(seq 1 10); do\r
+    rm -rf ${MAIL_DIR}/.notmuch\r
+    sudo /home/bremner/config/scripts/drop-caches\r
+    time_run "notmuch new #$i" 'notmuch new'\r
+done\r
+\r
+time_done\r
+\r
+--=-=-=\r
+Content-Type: application/octet-stream\r
+Content-Disposition: attachment; filename=drop-caches\r
+Content-Transfer-Encoding: base64\r
+\r
+c3luYwpzeW5jCmVjaG8gMSA+IC9wcm9jL3N5cy92bS9kcm9wX2NhY2hlcwplY2hvIDIgPiAvcHJv\r
+Yy9zeXMvdm0vZHJvcF9jYWNoZXMKZWNobyAzID4gL3Byb2Mvc3lzL3ZtL2Ryb3BfY2FjaGVzCg==\r
+--=-=-=--\r