[PATCH 0/4] emacs: show: lazy handling of hidden parts

Mark Walters markwalters1009 at gmail.com
Sat May 4 06:01:13 PDT 2013


This is a much better version of the WIP patch at
id:1367628568-11656-1-git-send-email-markwalters1009 at 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



More information about the notmuch mailing list