Re: [PATCH/RFC 0/3] Maildir custom flags and notmuch tags
[notmuch-archives.git] / da / ad5b1e468f76edd3ca1ca0f2379f875f4c865a
1 Return-Path: <patricktotzke@googlemail.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 67358431FD0\r
6         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 14:59:06 -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: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 uzodx91vpLXP for <notmuch@notmuchmail.org>;\r
17         Mon, 11 Jul 2011 14:59:05 -0700 (PDT)\r
18 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
19         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 45EB9431FB6\r
22         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 14:59:05 -0700 (PDT)\r
23 Received: by wyh22 with SMTP id 22so3246825wyh.26\r
24         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 14:59:04 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=googlemail.com; s=gamma;\r
27         h=date:from:to:cc:subject:message-id:references:mime-version\r
28         :content-type:content-disposition:in-reply-to:user-agent;\r
29         bh=TBu5anTZ281vVZYZ7L6WbhuPO7dXP2BaSf5eE/0xBH4=;\r
30         b=VPrdNOIRwSioQiCZNIJuO86WxJPxizUWfNr/TC61/MMsLzsck5t169qDMqL+20LHab\r
31         ECFbVICu5a+WtFojEvF2jUfHmvFwys7fy8d4HAq74RHt+8eRbmZcGHAi3N/y/uRSeLQ2\r
32         epsr3NO0pC1JcdnticBUanT8rijBJlDLO2UJI=\r
33 Received: by 10.216.235.157 with SMTP id u29mr3352438weq.24.1310421543803;\r
34         Mon, 11 Jul 2011 14:59:03 -0700 (PDT)\r
35 Received: from brick.lan (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com\r
36         [80.192.18.48])\r
37         by mx.google.com with ESMTPS id fe4sm10365228wbb.11.2011.07.11.14.59.00\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Mon, 11 Jul 2011 14:59:02 -0700 (PDT)\r
40 Date: Mon, 11 Jul 2011 22:58:58 +0100\r
41 From: Patrick Totzke <patricktotzke@googlemail.com>\r
42 To: Jason Woofenden <jason@jasonwoof.com>\r
43 Subject: Re: Slowness (search opens every email file?)\r
44 Message-ID: <20110711215858.GA18884@brick.lan>\r
45 References: <20110711190721.GA5386@compy.jasonwoof.org>\r
46 MIME-Version: 1.0\r
47 Content-Type: multipart/signed; micalg=pgp-sha1;\r
48         protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5"\r
49 Content-Disposition: inline\r
50 In-Reply-To: <20110711190721.GA5386@compy.jasonwoof.org>\r
51 User-Agent: Mutt/1.5.21 (2010-09-15)\r
52 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\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: Mon, 11 Jul 2011 21:59:06 -0000\r
66 \r
67 \r
68 --bg08WKrSYDhXBjb5\r
69 Content-Type: text/plain; charset=us-ascii\r
70 Content-Disposition: inline\r
71 Content-Transfer-Encoding: quoted-printable\r
72 \r
73 Hi Jason,\r
74 On Mon, Jul 11, 2011 at 03:07:21PM -0400, Jason Woofenden wrote:\r
75 > notmuch search tag:foo is slow!\r
76 >=20\r
77 yes, i've just used the vim ui for the first time and i agreee, its sluggis=\r
78 h,\r
79 searching for * takes a while.\r
80 \r
81 > (when my e-mail files are not already in the disk cache)\r
82 >=20\r
83 > I saw on my activity monitor applet that it was using mostly i/o,\r
84 > and started to wonder if it was opening every e-mail. I little work\r
85 > with strace and searching revealed that this command was opening\r
86 > many many e-mail files from my maildir(s). I spent a little while\r
87 > digging around in the notmuch source, and didn't see where it was\r
88 > opening the email files.\r
89 \r
90 I cannot reproduce this. I'm no expert, but at least the output of=20\r
91  strace vim -c ":NotMuch" 2>log\r
92 does not contain any path that matches that of my maildir.\r
93 Also, I wout be surprised if all individual mails would be read,\r
94 because for this, a search for all messages feels too fast.\r
95 \r
96 > 2) Do you agree that it should instead get this information from\r
97 > the database?\r
98 agreed. And If the mail files get read on every search for you,\r
99 something is definately going wrong there.\r
100 \r
101 A quick browse through notmuch.vim tells me that=20\r
102 1) it doesn't use notmuchs json output, i think it should, as iirc\r
103 this api is considered 'more stable' and is easier to parse than the=20\r
104 default output. More importantly,\r
105 2) the output of notmuch is copied into a list. This will of course\r
106 be slow if your query matches a lot of messages. Could this be done\r
107 by asyncronously writing to the buffer somehow?\r
108 \r
109 best,\r
110 /p\r
111 \r
112 --bg08WKrSYDhXBjb5\r
113 Content-Type: application/pgp-signature; name="signature.asc"\r
114 Content-Description: Digital signature\r
115 \r
116 -----BEGIN PGP SIGNATURE-----\r
117 Version: GnuPG v1.4.11 (GNU/Linux)\r
118 \r
119 iEYEARECAAYFAk4bciIACgkQlDQDZ9fWxaon3wCgvstp9RjrttNwVaoKWGu+4yvs\r
120 YTQAn0byopDOt2qtL68Xmvr1OxC20FpY\r
121 =glvO\r
122 -----END PGP SIGNATURE-----\r
123 \r
124 --bg08WKrSYDhXBjb5--\r