Re: notmuch-tree display
[notmuch-archives.git] / f5 / 681ef570d7e40e5375e4f39a3da5dc7e8bdc81
1 Return-Path: <amdragon@gmail.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 566D1429E28\r
6         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 13:18:55 -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.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
13         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 l1k6gRNVKev9 for <notmuch@notmuchmail.org>;\r
17         Thu, 26 May 2011 13:18:54 -0700 (PDT)\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
19         [209.85.216.53]) (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 6EDFB431FB6\r
22         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 13:18:54 -0700 (PDT)\r
23 Received: by qwb7 with SMTP id 7so723465qwb.26\r
24         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 13:18:53 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
27         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
28         :content-transfer-encoding;\r
29         bh=GEFCyn1hdkFdnm9bJLZnOPjUk7Km+3iLvPG5ntw8ZdU=;\r
30         b=hnUXrYC75xY8g79i4Jb5IauqrYAN0X1YMXJtI7oZLwQk1CXachC7I0Kr729r0eaHyZ\r
31         4b2liaSTK7sOgyd8ARTxHCurpSKr+FlBoIqjHSTFJ4jOwsxMbYu5YSL+iGhWTeCLyeOZ\r
32         PmWFIzcFv26HpA5P134lCaz6zvDes2zM2tdg8=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=mime-version:sender:in-reply-to:references:date\r
35         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
36         :content-transfer-encoding;\r
37         b=eWithQF5A6v2jJCJU5f5qtp8L5Fv4G7lZQwQwim+dM4OOuuaD2Gu3AGpnH13Ql7Ysn\r
38         CbwatW2PGHzUcHY4OTR5duQ08ABN0igl7EsJC28A9SUEErNdLzE63izd3ZawZanMLAI6\r
39         xdLW7fa5DC+JFYEY+F/nQ23zmgt/x5f11H21o=\r
40 MIME-Version: 1.0\r
41 Received: by 10.229.142.11 with SMTP id o11mr1003970qcu.46.1306441133374; Thu,\r
42         26 May 2011 13:18:53 -0700 (PDT)\r
43 Sender: amdragon@gmail.com\r
44 Received: by 10.229.188.68 with HTTP; Thu, 26 May 2011 13:18:53 -0700 (PDT)\r
45 In-Reply-To: <877h9d9y5m.fsf@yoom.home.cworth.org>\r
46 References: <1306397849-sup-3304@brick> <877h9d9y5m.fsf@yoom.home.cworth.org>\r
47 Date: Thu, 26 May 2011 16:18:53 -0400\r
48 X-Google-Sender-Auth: f8JApCG5-0jsiDTITBVtmmMXEbU\r
49 Message-ID: <BANLkTi=3mQYJft4s9jGaoqSbcJvqhmZXyQ@mail.gmail.com>\r
50 Subject: Re: one-time-iterators\r
51 From: Austin Clements <amdragon@mit.edu>\r
52 To: Carl Worth <cworth@cworth.org>,\r
53         Patrick Totzke <patricktotzke@googlemail.com>\r
54 Content-Type: text/plain; charset=ISO-8859-1\r
55 Content-Transfer-Encoding: quoted-printable\r
56 Cc: notmuch <notmuch@notmuchmail.org>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 26 May 2011 20:18:55 -0000\r
70 \r
71 On May 26, 2011 1:20 PM, "Carl Worth" <cworth@cworth.org> wrote:\r
72 > > The question: How do you solve this in the emacs code?\r
73 > > do you store all tids of a query?\r
74 >\r
75 > The emacs code does not use the notmuch library interface like your\r
76 > python bindings do. Instead, it uses the notmuch command-line tool, (and\r
77 > buffers up the text output by it). The support for asynchronous\r
78 > operations in the emacs interface means that it's likely possible\r
79 > someone could run into a similar problem:\r
80 >\r
81 > =A0 =A0 =A0 =A01. Start a search returning a *lot* of results\r
82 >\r
83 > =A0 =A0 =A0 =A02. When the first results come in, make some tag changes\r
84 >\r
85 > =A0 =A0 =A0 =A03. See if the original search aborts\r
86 >\r
87 > I may have even had this happen to me before, but if I did I've never\r
88 > actually noticed it. I don't know what a good answer might be for this\r
89 > problem.\r
90 \r
91 I proposed a solution to this problem a while ago\r
92 (id:"AANLkTi=3DKOx8aTJipkiArFVjEHE6zt_JypoASMiiAWBZ6@mail.gmail.com"),\r
93 though I haven't tried implementing it yet.\r
94 \r
95 Though, Patrick, that solution doesn't address your problem.=A0 On the\r
96 other hand, it's not clear to me what concurrent access semantics\r
97 you're actually expecting.=A0 I suspect you don't want the remaining\r
98 iteration to reflect the changes, since your changes could equally\r
99 well have affected earlier iteration results.=A0 But if you want a\r
100 consistent view of your query results, something's going to have to\r
101 materialize that iterator, and it might as well be you (or Xapian\r
102 would need more sophisticated concurrency control than it has).=A0 But\r
103 this shouldn't be expensive because all you need to materialize are\r
104 the document ids; you shouldn't need to eagerly fetch the per-thread\r
105 information.  Have you tried simply calling list() on your thread\r
106 iterator to see how expensive it is?  My bet is that it's quite cheap,\r
107 both memory-wise and CPU-wise.\r