WIP/RFP: lazy body insertion for notmuch-show mode

Subject: WIP/RFP: lazy body insertion for notmuch-show mode

Date: Sun, 5 Jun 2022 14:08:48 -0300

To: notmuch@notmuchmail.org


From: David Bremner

Many people have observed that notmuch-show is slow to render large
threads. This is pretty annoying when most of the thread is off
screen. The usual trick of working asynchronously doesn't seem
hopeful, since most of the work is in emacs proper, not externally.
This series attempts to reduce the amount of time before emacs is
responsive again by deferring the rendering of messages below a
certain depth in the tree until the user manually triggers it, via a

It isn't clear that depth is the best heuristic, but this seems like
an improvement on the status quo. Other heuristics could be added
later. I thought about some kind of "expose events" triggering the
rendering but I'm not sure that's better (and it seems harder). With
this approach the user can skip a few levels down the tree to render
the message they are interested in.

I learned while writing this that "text-buttons" might be faster. I'm
not sure my test thread of 264 messages is long enough to see the
difference. It would be helpful if people could test expanding message
bodies and see if there is an annoying lag. You will need to customize
the variable notmuch-show-depth-limit to test.

notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org