From b623d350f915e5e7865ca638e8c4d91f01f2c772 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 4 May 2013 14:01:13 +0100 Subject: [PATCH] [PATCH 0/4] emacs: show: lazy handling of hidden parts --- ef/8e8cc3eb4bddd3cec0127b8d295bd9396ed3f5 | 128 ++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 ef/8e8cc3eb4bddd3cec0127b8d295bd9396ed3f5 diff --git a/ef/8e8cc3eb4bddd3cec0127b8d295bd9396ed3f5 b/ef/8e8cc3eb4bddd3cec0127b8d295bd9396ed3f5 new file mode 100644 index 000000000..5b7cc2b55 --- /dev/null +++ b/ef/8e8cc3eb4bddd3cec0127b8d295bd9396ed3f5 @@ -0,0 +1,128 @@ +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 87F94431FC2 + for ; Sat, 4 May 2013 06:01:33 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.7 +X-Spam-Level: ** +X-Spam-Status: No, score=2.7 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, + FREEMAIL_REPLY=2.499, 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 BOyskPc3wQZh for ; + Sat, 4 May 2013 06:01:28 -0700 (PDT) +Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com + [74.125.82.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + DE645431FAF for ; Sat, 4 May 2013 06:01:27 -0700 + (PDT) +Received: by mail-wg0-f46.google.com with SMTP id n12so2295682wgh.1 + for ; Sat, 04 May 2013 06:01:26 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer; + bh=sDCZjgwVc63efwm/NZIAJRanw+q7NDCtUKhQyMYctGA=; + b=gW7ZIFUlGDOOFLIXdS993/cLGkoF5yfBg2vBNYEH99o9my4maTOk7wFspe83XeZgHt + ERI+xHPR8xiCE4NbRXXPZIWYx3ozQvgBVQsnB9nDBbShd+oaUIMtYeipHtbHLPSeSIET + w9IKu5Dt/8VmdqLULqcKiYYvQVy6q+3MRH7auqyh9GrJ5ZwUDf06AOMhi3wjrdPNV7Ff + /FjHvTmn8aHy62R2g5lseVlsWhzVUIpyyEw3Yo5Nm05zkI9xuf3Zfat67HKNb6/t7S14 + 8p92W8uR2UKr7eBg/zHvvo74jIT0jFCprzwUhYy0d6tPjTJ1DoHPiQEC0I0rBMJb31m/ + bafQ== +X-Received: by 10.180.183.210 with SMTP id eo18mr1993253wic.17.1367672485299; + Sat, 04 May 2013 06:01:25 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id x13sm3143128wib.3.2013.05.04.06.01.23 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 04 May 2013 06:01:24 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/4] emacs: show: lazy handling of hidden parts +Date: Sat, 4 May 2013 14:01:13 +0100 +Message-Id: <1367672478-12247-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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: Sat, 04 May 2013 13:01:33 -0000 + +This is a much better version of the WIP patch at +id:1367628568-11656-1-git-send-email-markwalters1009@gmail.com + +There was some discussion on irc about the new invisibility handling +making large threads of messages with html parts slow to appear. This +is caused by the new code rendering all of these parts and then hiding +them. (I think this is exacerbated by the text/html having to fetch +the part as a separate request: it is not in the notmuch show output). + +This code makes the rendering of all hidden parts lazy (ie it occurs +when the part is shown). This should make the common case of hidden +parts which are never viewed much faster. + +The code is relatively simple: we store all the arguments to the part +insertion handler on the part button and then give them to the part +handler when needed. This is not very memory efficient (we already +store the whole message so we could extract it all again) but I think +it is unlikely to be a problem in practice. + +The patch series looks very large but almost everything of interest +happens in the final patch: the rest is code rearrangement. In +particular patch 3/4 is entirely code rearrangement (and since it +changes some indentation looks like it changes much more than it +actually does). + +Testing is always helpful but there are two particular things that +would be very useful: first, if anyone who has found it slow can see +if this fixes it and secondly if anyone with encryption setup could +test that the encryption buttons all work and look correct (I don't +have encryption set up). + +In my small amount of testing it seems to work and all tests pass. + +Best wishes + +Mark + + +Mark Walters (4): + emacs:show: separate out handling of application/octet-stream + emacs: show: handle inline patch fake parts at top level + emacs: show: move the insertion of the header button to the top level + emacs: show: implement lazy hidden part handling + + emacs/notmuch-show.el | 136 ++++++++++++++++++++++++++++++------------------- + emacs/notmuch-wash.el | 2 +- + 2 files changed, 84 insertions(+), 54 deletions(-) + +-- +1.7.9.1 + + +*** BLURB HERE *** + +Mark Walters (4): + emacs:show: separate out handling of application/octet-stream + emacs: show: handle inline patch fake parts at top level + emacs: show: move the insertion of the header button to the top level + emacs: show: implement lazy hidden part handling + + emacs/notmuch-show.el | 136 ++++++++++++++++++++++++++++++------------------- + emacs/notmuch-wash.el | 2 +- + 2 files changed, 84 insertions(+), 54 deletions(-) + +-- +1.7.9.1 + -- 2.26.2