Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 05 / d660e341cbb020612a496a6e56c3fe756f21a4
1 Return-Path: <jason@jasonwoof.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 EC13C429E25\r
6         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 12:07:32 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 fKskhNoPq-HR for <notmuch@notmuchmail.org>;\r
16         Mon, 11 Jul 2011 12:07:32 -0700 (PDT)\r
17 Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com\r
18         [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 7931F431FD0\r
21         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 12:07:32 -0700 (PDT)\r
22 Received: by vws13 with SMTP id 13so3276897vws.26\r
23         for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 12:07:31 -0700 (PDT)\r
24 Received: by 10.52.181.33 with SMTP id dt1mr2492828vdc.525.1310411251535;\r
25         Mon, 11 Jul 2011 12:07:31 -0700 (PDT)\r
26 Received: from compy.jasonwoof.org (c-98-216-100-90.hsd1.ma.comcast.net\r
27         [98.216.100.90])\r
28         by mx.google.com with ESMTPS id pm1sm1082678vcb.9.2011.07.11.12.07.29\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Mon, 11 Jul 2011 12:07:30 -0700 (PDT)\r
31 Date: Mon, 11 Jul 2011 15:07:21 -0400\r
32 From: Jason Woofenden <jason@jasonwoof.com>\r
33 To: Notmuch Mail <notmuch@notmuchmail.org>\r
34 Subject: Slowness (search opens every email file?)\r
35 Message-ID: <20110711190721.GA5386@compy.jasonwoof.org>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 Content-Disposition: inline\r
39 User-Agent: Mutt/1.5.21 (2010-09-15)\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Mon, 11 Jul 2011 19:07:33 -0000\r
53 \r
54 Hi all,\r
55 \r
56 I'm having a great time patching up the vim frontend, but I've got\r
57 an issue that is in the backend, and seems far above my head at\r
58 this point:\r
59 \r
60 notmuch search tag:foo is slow!\r
61 \r
62 (when my e-mail files are not already in the disk cache)\r
63 \r
64 I saw on my activity monitor applet that it was using mostly i/o,\r
65 and started to wonder if it was opening every e-mail. I little work\r
66 with strace and searching revealed that this command was opening\r
67 many many e-mail files from my maildir(s). I spent a little while\r
68 digging around in the notmuch source, and didn't see where it was\r
69 opening the email files.\r
70 \r
71 I don't think the search command should be opening the files. So my\r
72 questions:\r
73 \r
74 1) Why is it opening the e-mail files? What information is being\r
75 read?\r
76 \r
77 2) Do you agree that it should instead get this information from\r
78 the database?\r
79 \r
80 3) How hard would it be make this fast? What would it take?\r
81 \r
82 4) Who wants to do it?\r
83 \r
84 \r
85 I'd like it to be able to spit out 1000 threads in under a second.\r
86 Preferably under 100ms.\r
87 \r
88 \r
89 Thank you,    -- Jason\r
90 \r
91 \r
92 P.S. I mean really slow... \r
93 \r
94 notmuch search tag:foo  took  0.5 seconds for 32 threads\r
95 \r
96 notmuch search foo took 6.4 seconds for 130 threads\r
97 \r
98 Everything's getting into my cache, so I can't easily get lots of\r
99 numbers. For a while I had a simple search (tag:foo and tag:bar)\r
100 which returned about 600 threads, and it would frequently take\r
101 seconds.\r