--- /dev/null
+Return-Path: <markwalters1009@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 1EE12431FBC\r
+ for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ 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 qDEwQ3qy72Lw for <notmuch@notmuchmail.org>;\r
+ Thu, 23 Feb 2012 13:40:09 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+ [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 815C6431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:09 -0800 (PST)\r
+Received: by wibhi8 with SMTP id hi8so1195426wib.26\r
+ for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:08 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
+ 10.216.138.34 as permitted sender) client-ip=10.216.138.34; \r
+Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
+ markwalters1009@gmail.com designates 10.216.138.34 as permitted\r
+ sender) smtp.mail=markwalters1009@gmail.com;\r
+ dkim=pass header.i=markwalters1009@gmail.com\r
+Received: from mr.google.com ([10.216.138.34])\r
+ by 10.216.138.34 with SMTP id z34mr45315wei.27.1330033208162 (num_hops\r
+ = 1); Thu, 23 Feb 2012 13:40:08 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:cc:subject:date:message-id:x-mailer;\r
+ bh=xyxw8nV2gF+lHhVXnUozzP0TshkazbWt1KU6iCYlWaU=;\r
+ b=jNVlBvNEdlExGEZr8QPZ+60Fqd/qLuTs4ozAuE6vIsqVmAwiNcus9qmWi+nPAQ8kkm\r
+ u2Cb51VFk/CIA+6xaYN8CcAsHFAMU12A1UUtiOG/qUIDQwqzdkXaU9ziaMMfwIf4RUz5\r
+ PL9mWgqc1za89Rj7kPa1DHZrdEmW3AAXM5LsU=\r
+Received: by 10.216.138.34 with SMTP id z34mr37627wei.27.1330033208072;\r
+ Thu, 23 Feb 2012 13:40:08 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223]) by mx.google.com with ESMTPS id\r
+ d7sm12320042wiz.6.2012.02.23.13.40.06 (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Thu, 23 Feb 2012 13:40:07 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/2] Make elide messages use cli side\r
+Date: Thu, 23 Feb 2012 21:41:32 +0000\r
+Message-Id: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\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: Thu, 23 Feb 2012 21:40:10 -0000\r
+\r
+Currently the elide messages option in notmuch-show.el fetches all\r
+messages in the thread (via notmuch-show.c) parses the JSON and throws \r
+away all the non-matching messages.\r
+\r
+This patch removes the entire-thread assumption for format=json from \r
+notmuch-show.c. This allows the emacs code to call notmuch-show with \r
+out the --entire-thread flag and just receive the matching messages \r
+(but with the full thread structure) in return. \r
+\r
+This makes notmuch-show.c much faster (but in practice this is small\r
+anyway) but more importantly substantially improves the speed of the\r
+JSON parsing. Rough wall clock timing on my system shows (best case) a\r
+4 second time for showing a large thread (170 messages) reduced to an\r
+almost instant time for a single matching message from that thread.\r
+\r
+For the existing show view the gain is nice but not critical. However,\r
+notmuch-pick shows a single message at a time and the speed increase\r
+will be needed there.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+Mark Walters (2):\r
+ emacs/cli: remove entire-thread default from show: JSON\r
+ emacs: make elide messages use notmuch-show for omitting messages.\r
+\r
+ emacs/notmuch-show.el | 15 +++++++++------\r
+ notmuch-show.c | 1 -\r
+ 2 files changed, 9 insertions(+), 7 deletions(-)\r
+\r
+-- \r
+1.7.2.3\r
+\r