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