Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 0d / 2c4cb733e564af7da4681b0e2f8601d34dc432
1 Return-Path: <cworth@cworth.org>\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 2FDF2431FBF;\r
6         Mon, 23 Nov 2009 18:11:53 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id Ov4Sn-oQ8iyK; Mon, 23 Nov 2009 18:11:52 -0800 (PST)\r
11 Received: from cworth.org (localhost [127.0.0.1])\r
12         by olra.theworths.org (Postfix) with ESMTP id 778B6431FAE;\r
13         Mon, 23 Nov 2009 18:11:51 -0800 (PST)\r
14 From: Carl Worth <cworth@cworth.org>\r
15 To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org\r
16 In-Reply-To: <20091123110742.GE1496@plug.localdomain>\r
17 References: <20091123110742.GE1496@plug.localdomain>\r
18 Date: Mon, 23 Nov 2009 18:11:39 -0800\r
19 Message-ID: <87ocms659g.fsf@yoom.home.cworth.org>\r
20 MIME-Version: 1.0\r
21 Content-Type: text/plain; charset=us-ascii\r
22 Subject: Re: [notmuch] Multithreaded access\r
23 X-BeenThere: notmuch@notmuchmail.org\r
24 X-Mailman-Version: 2.1.12\r
25 Precedence: list\r
26 List-Id: "Use and development of the notmuch mail system."\r
27         <notmuch.notmuchmail.org>\r
28 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
29         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
30 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
31 List-Post: <mailto:notmuch@notmuchmail.org>\r
32 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
33 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
34         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
35 X-List-Received-Date: Tue, 24 Nov 2009 02:11:53 -0000\r
36 \r
37 On Mon, 23 Nov 2009 22:07:42 +1100, Peter Wang <novalazy@gmail.com> wrote:\r
38 > I am also toying around with a curses frontend for notmuch :-)\r
39 > One thing that I would really like to have is asynchronous search:\r
40 > I should be able to begin reading mail even while search results\r
41 > are rolling in.\r
42 \r
43 Absolutely! I just coded this up on my plane ride home for notmuch.el\r
44 and it is *fantastic*. It takes notmuch from "OK, as long as your\r
45 searches don't have a lot of results" to "Blisteringly fast,\r
46 regardless of what you're doing."\r
47 \r
48 And it's not like sup, where you page down and then wait for more\r
49 search results to page in. Things just keep filling up in the buffer\r
50 while you're reading and navigating, just as it should be.\r
51 \r
52 I'll be cleaning this up and pushing it out soon. I'm very excited\r
53 about it.\r
54 \r
55 > At the moment I'm using one read-only database_t* and creating multiple\r
56 > queries off it.  There's a background thread[1] slurping up <n> search\r
57 > results at a time, then passes them to the main thread.  The main thread\r
58 > also handles the pager.  When the user goes to open a thread, it creates\r
59 > a separate query_t so that it can look up the messages and their headers\r
60 > and filenames.\r
61 \r
62 Hmmm... in my code with emacs, I'm just using separate processes,\r
63 (which seems to be working fine). I haven't looked into Xapian's\r
64 documentation with regard to threads yet, so I can't actually say how\r
65 well notmuch's library work with threads yet.\r
66 \r
67 > A future concern is how to handle tag updates.  Could I open the database\r
68 > for writing in one thread, and read-only in another?\r
69 \r
70 Again, I don't know about the threading yet. But you can definitely\r
71 open the database read-write in one process while also having it be\r
72 opened read-only in another.\r
73 \r
74 -Carl\r