--- /dev/null
+Return-Path: <alpine.art.de@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id E2829431FBC\r
+ for <notmuch@notmuchmail.org>; Tue, 23 Jul 2013 22:38:10 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id qbX-Ry1zQc4I for <notmuch@notmuchmail.org>;\r
+ Tue, 23 Jul 2013 22:38:06 -0700 (PDT)\r
+Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com\r
+ [209.85.214.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id D03CB431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 23 Jul 2013 22:38:05 -0700 (PDT)\r
+Received: by mail-bk0-f47.google.com with SMTP id jg1so3262375bkc.20\r
+ for <notmuch@notmuchmail.org>; Tue, 23 Jul 2013 22:38:03 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:subject:date:user-agent:mime-version:message-id:in-reply-to\r
+ :references:content-type:content-transfer-encoding;\r
+ bh=nyB11t58/jEX24xX0GDUGsKyy5YpDHWhbF7uJXVp8MM=;\r
+ b=Vz9gGtyT/k4/6W/MSffnerZLi6v7Ro2tGJLcNGA+hl/g5h3tm1/ii8h4TeNYAEsDJh\r
+ t8OQPjPvPKi2GsEHLEMlmuQ/IMuPpW3x1TbvRALbzQY5JtBU/JLZlG3VRnj4MF+MQf3O\r
+ ELUKDerOWcjPx6izM1XJfVJ6s2a7bIVebA7FiLLdau6Qtpo3cFOkUCAWmJu3Y18QygPa\r
+ 6bzeJmNxAIKqM344jopAE8aA3w55+fD6nPWknSucct68WTVmBX7qYyqbrjphRTllkvys\r
+ 3v7dYWXTtaR4uLoB4nNvMrkiir4p8nRhHv6OcRER4u9H5crrfOW76E/LdkWIvQY6yE6z\r
+ wbdQ==\r
+X-Received: by 10.204.225.73 with SMTP id ir9mr5069096bkb.45.1374644281886;\r
+ Tue, 23 Jul 2013 22:38:01 -0700 (PDT)\r
+Received: from localhost (p4FD0C5B1.dip0.t-ipconnect.de. [79.208.197.177])\r
+ by mx.google.com with ESMTPSA id pc8sm4281328bkb.10.2013.07.23.22.38.00\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
+ Tue, 23 Jul 2013 22:38:01 -0700 (PDT)\r
+From: Franz Fellner <alpine.art.de@gmail.com>\r
+To: <notmuch@notmuchmail.org>\r
+Subject: Re: Performance-issues with large threads\r
+Date: Wed, 24 Jul 2013 07:39:48 +0200\r
+User-Agent: trojita/v0.3.93-100-gbbf4022-dirty; Qt/4.8.4; X11; Linux; \r
+MIME-Version: 1.0\r
+Message-ID: <418182bd-9a04-4e1d-8392-ce16d64681c0@gmail.com>\r
+In-Reply-To: <87wqoh77zh.fsf@qmul.ac.uk>\r
+References: <027633b9-200d-4174-a8b5-72daff923b93@gmail.com>\r
+ <87wqoh77zh.fsf@qmul.ac.uk>\r
+Content-Type: text/plain; charset=utf-8; format=flowed\r
+Content-Transfer-Encoding: quoted-printable\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 24 Jul 2013 05:38:11 -0000\r
+\r
+Hej,=0A=0A> How long does =0A>=0A> notmuch show --format=3Djson thread:=\r
+thread-id > /dev/null=0A>=0A> take? Is it much faster after the first =\r
+run? What about the same with=0A> the added cli option --body=3Dfalse?=0A=\r
+=0A[7:23] $ time notmuch show --format=3Djson thread:00000000000002d1 >=\r
+|/dev/null=0Anotmuch show --format=3Djson thread:00000000000002d1 >| /d=\r
+ev/null 0,33s user 0,09s system 8% cpu 4,571 total=0A[7:25] $ time not=\r
+much show --format=3Djson thread:00000000000002d1 >|/dev/null=0Anotmuch=\r
+ show --format=3Djson thread:00000000000002d1 >| /dev/null 0,12s user =\r
+0,02s system 99% cpu 0,139 total=0A[7:25] $ time notmuch show --format=3D=\r
+json --body=3Dfalse thread:00000000000002d1 >|/dev/null=0Anotmuch show =\r
+--format=3Djson --body=3Dfalse thread:00000000000002d1 >| /dev/null 0,=\r
+30s user 0,08s system 8% cpu 4,446 total=0A[7:25] $ time notmuch show -=\r
+-format=3Djson --body=3Dfalse thread:00000000000002d1 >|/dev/null=0Anot=\r
+much show --format=3Djson --body=3Dfalse thread:00000000000002d1 >| /de=\r
+v/null 0,10s user 0,01s system 99% cpu 0,119 total=0A[7:26] $=0A=0ASo =\r
+fetching without cache takes 4.5 secs, with only 0.1 -> The issue could=\r
+ be in parsing the result inside notmuch-vim/alot/...=0A=0A> Do the mes=\r
+sages have html parts?=0AYes, most of them do (unless you reply by mail=\r
+ and only use plaintext).=0A=0A> Also what disk are you using (and does=\r
+ it have any other significant=0A> activity happening)? And what versio=\r
+n of notmuch are you using?=0AI use a HDD with 5400 RPM. The most inter=\r
+esting activity is ~80-100% CPU usage during loading, all the 13 secs -=\r
+ quite a battery killer ;)=0AI regularly build from latest git master (=\r
+due to the vim-client).=0A=0A>=0A> Best wishes=0A>=0A> Mark=0A>=0A>=0A>=\r
+=0A>=0A>=0A>=0A> Franz Fellner <alpine.art.de@gmail.com> writes:=0A>=0A=\r
+>> Hi,=0A>> =0A>> "Large" in the context of this issue is >20 replies, =\r
+I have to =0A>> wait ~1 sec until the thread shows up. With larger =0A>=\r
+> conversations it get's worse (a bug report on bugs.kde.org with =0A>>=\r
+ ~400 replies takes ~13 secs. to load).=0A>> This is due to the fact, t=\r
+hat notmuch-{vim,emacs} load the =0A>> complete mail including the body=\r
+.=0A>> ner does a great job here, it loads all headers but only the =0A=\r
+>> body of the first unread mail, resulting in instant loading =0A>> ev=\r
+en of gigantic conversations. It would be terrific to see =0A>> somethi=\r
+ng like that, at least in my favored vim-client ;)=0A>> =0A>> Thx ...=0A=\r
+>=0A>=0A\r