Re: Applying patches directly from emails?
[notmuch-archives.git] / 2a / 78ad0916900c5a766dec3c62f13d9108ec0e1e
1 Return-Path: <sebastien.binet@cern.ch>\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 5C541431FBD\r
6         for <notmuch@notmuchmail.org>; Mon,  9 Jul 2012 09:45:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -5\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-5 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_HI=-5] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id GaTrP1WgRnmh for <notmuch@notmuchmail.org>;\r
16         Mon,  9 Jul 2012 09:45:53 -0700 (PDT)\r
17 Received: from CERNMX30.cern.ch (cernmx30.cern.ch [137.138.144.177])\r
18         (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 59168431FAE\r
21         for <notmuch@notmuchmail.org>; Mon,  9 Jul 2012 09:45:53 -0700 (PDT)\r
22 Received: from CERNFE22.cern.ch (137.138.144.151) by cernmxgwlb2.cern.ch\r
23         (137.138.144.177) with Microsoft SMTP Server (TLS) id 14.2.283.3;\r
24         Mon, 9 Jul 2012 18:45:50 +0200\r
25 Received: from localhost (134.158.88.68) by smtp.cern.ch (137.138.144.172)\r
26         with Microsoft SMTP Server (TLS) id 14.2.298.4; Mon, 9 Jul 2012 18:45:50\r
27         +0200\r
28 From: Sebastien Binet <binet@cern.ch>\r
29 To: Jameson Graef Rollins <jrollins@finestructure.net>, Notmuch developer list\r
30         <notmuch@notmuchmail.org>\r
31 Subject: Re: query on a subset of messages ?\r
32 In-Reply-To: <87ehol2aku.fsf@servo.finestructure.net>\r
33 References: <871ukl5oj7.fsf@cern.ch> <87ehol2aku.fsf@servo.finestructure.net>\r
34 User-Agent: Notmuch/0.13.2+60~g7ecf77d (http://notmuchmail.org) Emacs/24.1.1\r
35         (x86_64-unknown-linux-gnu)\r
36 Date: Mon, 9 Jul 2012 18:45:44 +0200\r
37 Message-ID: <87wr2c3mtj.fsf@cern.ch>\r
38 MIME-Version: 1.0\r
39 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1;\r
40         protocol="application/pgp-signature"\r
41 X-Originating-IP: [134.158.88.68]\r
42 Keywords: CERN SpamKiller Note: -50\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Mon, 09 Jul 2012 16:45:54 -0000\r
56 \r
57 --=-=-=\r
58 Content-Type: text/plain\r
59 Content-Transfer-Encoding: quoted-printable\r
60 \r
61 Jamie,\r
62 \r
63 Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
64 \r
65 > On Mon, Jul 09 2012, Sebastien Binet <binet@cern.ch> wrote:\r
66 >> I was trying to reduce the I/O stress during my usual email\r
67 >> fetching+tagging by writing a little program using the go bindings to\r
68 >> notmuch.\r
69 >>\r
70 >> ie:\r
71 >> db, status :=3D notmuch.OpenDatabase(db_path,\r
72 >>              notmuch.DATABASE_MODE_READ_WRITE)\r
73 >> query :=3D db.CreateQuery("(tag:new AND tag:inbox)")\r
74 >> msgs :=3D query.SearchMessages()\r
75 >> for _,msg :=3D range msgs {\r
76 >>   tag_msg(msg, tagqueries)\r
77 >> }\r
78 >>\r
79 >>\r
80 >> where tagqueries is a subquery of the form:\r
81 >> [\r
82 >>     {\r
83 >>         "Cmd": "+to-me",\r
84 >>         "Query": "(to:sebastien.binet@cern.ch and not tag:to-me)"\r
85 >>     },\r
86 >>     {\r
87 >>         "Cmd": "+sci-notmuch",\r
88 >>         "Query": "from:notmuch@notmuchmail.org or to:notmuch@notmuchmail=\r
89 .org or subject:notmuch"\r
90 >>     }\r
91 >> ]\r
92 >\r
93 >\r
94 > Hi, Sebastian.  It's really hard for me to believe that this is much\r
95 > faster than simply making the two tagging calls in full:\r
96 >\r
97 > notmuch tag +to-me -- tag:new and tag:inbox and (to:sebastien.binet@cern.=\r
98 ch and not tag:to-me)\r
99 > notmuch tag +sci-notmuch -- tag:new and tag:inbox and from:notmuch@notmuc=\r
100 hmail.org or to:notmuch@notmuchmail.org or subject:notmuch"\r
101 >\r
102 > After the first call the cache will be fresh, so the overhead should be\r
103 > minimal.  It looks to me you're looking in to this as a post-new hook.\r
104 > I do pretty much the same thing, and with the above properly constructed\r
105 > searches the tagging is super fast.\r
106 \r
107 well, of course I don't have just those two:\r
108 \r
109 $ grep -He "^tag_new " emacs/notmuch-lib/notmuch-tag.sh | wc -l\r
110 54\r
111 \r
112 also:\r
113 $ du -hs mail-notmuch/.notmuch=20\r
114 2.9G    mail-notmuch/.notmuch\r
115 \r
116 that said, most of the I/O wait seem to come from 'notmuch new' (after\r
117 having dropped all fs caches.)\r
118 \r
119 ok, post-new hook it is then :)\r
120 \r
121 (but there is probably something to do to speed-up a 'notmuch new' after\r
122 having dropped all fs caches... ?)\r
123 \r
124 =2Ds\r
125 \r
126 --=-=-=\r
127 Content-Type: application/pgp-signature\r
128 \r
129 -----BEGIN PGP SIGNATURE-----\r
130 Version: GnuPG v2.0.19 (GNU/Linux)\r
131 \r
132 iEYEARECAAYFAk/7Cr4ACgkQPj4AVbsZCCYJhwCbBQdX5QsFjL2g43C3sDdUseNO\r
133 6sgAn09SDXMqJoAQgbHoXKMvEObt60yM\r
134 =Ey0V\r
135 -----END PGP SIGNATURE-----\r
136 --=-=-=--\r