Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B2B79431FB6 for ; Tue, 19 Jun 2012 00:07:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.401 X-Spam-Level: * X-Spam-Status: No, score=1.401 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y0YHboPn1yKw for ; Tue, 19 Jun 2012 00:07:56 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id BA5FE431FAF for ; Tue, 19 Jun 2012 00:07:55 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1SgsXY-0003gN-Dp; Tue, 19 Jun 2012 08:07:54 +0100 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1SgsXY-0002F6-1s; Tue, 19 Jun 2012 08:07:52 +0100 From: Mark Walters To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: Notmuch Pick In-Reply-To: <87zk80ilt9.fsf@servo.finestructure.net> References: <87395ump0d.fsf@qmul.ac.uk> <87zk80ilt9.fsf@servo.finestructure.net> User-Agent: Notmuch/0.13.2+63~g548a9bf (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Tue, 19 Jun 2012 08:07:50 +0100 Message-ID: <87mx3zok3d.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 550aeb014d2c6b6a585f11d6ab22dba5 (of first 20000 bytes) X-SpamAssassin-Score: -1.2 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.2 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 1.0 FREEMAIL_REPLY From and body contain different freemails * 0.1 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 07:07:56 -0000 On Mon, 18 Jun 2012, Jameson Graef Rollins wrote: > On Sat, Jun 16 2012, Mark Walters wrote: >> Since I have had various requests for notmuch pick >> (id:"1329096015-8078-2-git-send-email-markwalters1009@gmail.com") so I >> have started a git repository at >> git://github.com/markwalters1009/notmuch.git >> >> The branch pick-6 is the current version. My intention is to start a new >> branch each time I rebase on to current master but this may change. (I >> suggest that people do not rely on a consistent history for this repository) > > Hey, Mark. I took a look at this and I have a couple of comments: > > 726e11aff69e10499a9855e0ac2f15e518985c1f > cli: notmuch-show with framing newlines between threads in JSON. > > This patch introduces a change in the json output format, but there is > no subsequent update of the test suite, so it's causing a lot of test > failures. Obviously this needs to be fixed, but it would probably be > nice to include a couple of other tests for the pick output itself. At > the very least a sanity test to check that it's working at all would be > sufficient initially. Hi As you say several tests do need fixing: I thought I would leave that until people said they were basically happy with the change. I am not sure about sanity tests for pick: how would that work while it lives in contrib? Obviously it would need some tests before coming in to proper mainline. > Would it also be useful to make this same change for the search out, for > consistency? I notice the search output now uses newlines between all > fields, which should help for asynchronous processing, but it might be > nice to put newline separators between the initial and final brackets as > well. Right. > df97df62b70b884a1cd367360ed6ff7eda0e8af6 > cli: add --headers_only option to notmuch-show.c > > Your comment in this patch is very interesting: > > This is used by notmuch-pick.el (although not needed) because it gives a > speed-up of at least a factor of a two; moreover it reduces the memory > usage in emacs hugely. > > The only difference between the regular show json output and the > --headers-only output, as far as I can tell, is the presence of the > content of text/plain parts if they exist in the message. We previously > had a discussion about the show output not including any part bodies at > all, but we decided that the inclusion of text/plain bodies shouldn't > affect anything, so why not include them. If they actually do, then I > argue we should just move to having show json not include any body parts > at all by default, and just have them be retrieved individually like we > do currently for non-text/plain parts. This would make things cleaner, > and would get rid of the need to have this extra option, which really > doesn't produce a significantly different output. For one use of pick (displaying the structure of a single thread) this is not important (and the asynchronous stuff is irrelevant too). For another use of displaying the thread structure of a whole "folder" of messages it is important. For example the output of notmuch show tag:notmuch is about 70MB on my system, whereas with the --headers-only option this drops to about 7MB. Note Emacs uses substantially more than this much memory to actually process the JSON, and on a low-powered laptop this is enough to cause a swap-storm. Your suggestion of just not including the text/plain is nice for notmuch-pick, and is very simple (a single line change). However, it does seem to slow the emacs show mode down noticeably on large threads (something like 2s to 4s on a thread with 180 messages) so I worry that this change might annoy people. What do you think? Many thanks for the comments! Mark