1 Return-Path: <Vladimir.Marek@Oracle.COM>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 73636431FD2
\r
6 for <notmuch@notmuchmail.org>; Sat, 31 Aug 2013 23:59:42 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id i60PTRgDCTRV for <notmuch@notmuchmail.org>;
\r
17 Sat, 31 Aug 2013 23:59:36 -0700 (PDT)
\r
18 Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 6250B41A56A
\r
22 for <notmuch@notmuchmail.org>; Thu, 29 Aug 2013 12:41:27 -0700 (PDT)
\r
23 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
\r
24 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with
\r
25 ESMTP id r7TJfMAV010250
\r
26 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
\r
27 Thu, 29 Aug 2013 19:41:23 GMT
\r
28 Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85])
\r
29 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
\r
31 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
\r
32 Thu, 29 Aug 2013 19:41:22 GMT
\r
33 Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53])
\r
34 by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
\r
35 r7TJfLjh007382; Thu, 29 Aug 2013 19:41:21 GMT
\r
36 Received: from virt.cz.oracle.com (/10.163.102.127)
\r
37 by default (Oracle Beehive Gateway v4.0)
\r
38 with ESMTP ; Thu, 29 Aug 2013 12:41:20 -0700
\r
39 Date: Thu, 29 Aug 2013 21:41:14 +0200
\r
40 From: Vladimir Marek <Vladimir.Marek@Oracle.COM>
\r
41 To: Austin Clements <amdragon@mit.edu>
\r
42 Subject: Re: Re: Possible addtions to notmuch new ?
\r
43 Message-ID: <20130829194114.GA133@virt.cz.oracle.com>
\r
44 References: <20130812093443.GB16684@virt.cz.oracle.com>
\r
45 <20130812143426.GA13257@mit.edu>
\r
47 Content-Type: text/plain; charset=utf-8
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <20130812143426.GA13257@mit.edu>
\r
50 User-Agent: Mutt/ (2012-12-30)
\r
51 X-Source-IP: acsinet22.oracle.com [141.146.126.238]
\r
52 Cc: notmuch@notmuchmail.org
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sun, 01 Sep 2013 06:59:42 -0000
\r
69 > > My mail setup is a directory containing several subdirectories each
\r
70 > > subdirectory corresponds to one real mail account I am using. Each mail
\r
71 > > account is synchronized differently - I am using offlineimap, fetchmeail
\r
72 > > or even synthetically created emails (I am writing very simple jabber<->
\r
73 > > mail gate).Every now and then I am running 'notmuch new' to discover new
\r
74 > > emails and make them available in my MUA.
\r
76 > > That works pretty well, but has some disadvantages too
\r
77 > > - notmuch new takes very long time (30s) during which the notmuch
\r
78 > > database seems to be locked for any other updates from my MUA
\r
79 > > - notmuch new takes long time because it always processes my archive
\r
80 > > dir containing many files. That's mostly un-necessary as typically
\r
81 > > there's no new mail delivered
\r
83 > Could you try this patch? It's basically untested other than passing
\r
84 > the test suite, though in principle the worst harm it could do is make
\r
85 > notmuch new miss new messages or think renames are deletions. If it
\r
86 > helps significantly with your performance problems, I'll clean it up
\r
89 > diff --git a/notmuch-new.c b/notmuch-new.c
\r
90 > index faa33f1..196c5cb 100644
\r
91 > --- a/notmuch-new.c
\r
92 > +++ b/notmuch-new.c
\r
93 > @@ -323,6 +323,9 @@ add_files (notmuch_database_t *notmuch,
\r
95 > db_mtime = directory ? notmuch_directory_get_mtime (directory) : 0;
\r
97 > + if (directory && db_mtime == fs_mtime && st.st_nlink == 2)
\r
100 > /* If the database knows about this directory, then we sort based
\r
101 > * on strcmp to match the database sorting. Otherwise, we can do
\r
102 > * inode-based sorting for faster filesystem operation. */
\r
105 I'm sorry for my late reply. It cuts the average time of 'notmuch new'
\r
106 from 25s to 0.2s . Which is a bit scary :) But understandable. I have
\r
107 the notmuch database on NFS mount which hopefully won't make any
\r
110 Thank you for the tip!
\r