From: John Steele Scott <toojays@toojays.net>
To: notmuch@notmuchmail.org
Subject: Re: slow rendering of some HTML mail threads in emacs/notmuch due to shr.
Date: Sat, 20 Apr 2013 12:49:53 +0930 [thread overview]
Message-ID: <kkt1gk$kmu$1@ger.gmane.org> (raw)
In-Reply-To: <kkt0b4$d1a$1@ger.gmane.org>
On 20/04/13 12:29, John Steele Scott wrote:
> I've been enjoying using notmuch in emacs to handle my email, but some threads take aaaages to render. I'm talking three minutes for a thread with 15 messages. I'm not sure what it is in particular about this thread. Some combination of Outlook generated HTML and much repeated top-posting perhaps. I have observed similar slowness for threads of HTML mails produced by the ReviewBoard code review system.
>
> For this particular Outlook thread, I used elp-instrument package to instrument shr before showing the thread. The most time was spent in these functions:
>
> shr-descend 11783 196.09731454 0.0166423928
> shr-generic 11681 190.86248305 0.0163395670
> shr-tag-blockquote 81 57.140909005 0.7054433210
> shr-tag-div 348 48.511533571 0.1394009585
> shr-insert-document 14 27.808360994 1.9863114995
> shr-tag-body 14 27.158463401 1.9398902429
> shr-tag-p 4121 23.766379281 0.0057671388
> shr-insert 8962 21.705253155 0.0024219206
> shr-colorize-region 1075 2.6348254729 0.0024510004
> shr-put-color 2135 2.4779991750 0.0011606553
> shr-indent 13246 1.5816357290 0.0001194047
> shr-expand-newlines 1075 1.4488115139 0.0013477316
> shr-find-fill-point 5281 0.9872837309 0.0001869501
> shr-tag-br 4162 0.9527550159 0.0002289175
> shr-transform-dom 11123 0.6487086020 5.832...e-05
> shr-remove-trailing-whitespace 14 0.5503726889 0.0393123349
> shr-ensure-paragraph 8412 0.5039738979 5.991...e-05
> shr-buffer-width 1075 0.4900505680 0.0004558609
> shr-tag-b 381 0.17374644 0.0004560274
> shr-fontize-cont 381 0.172155226 0.0004518509
> shr-tag-table 8 0.154814786 0.0193518482
I should have mentioned, I'm using:
GNU Emacs 24.3.1 built from bzr://bzr.savannah.gnu.org/emacs/emacs-24/ revno: 111336
notmuch 0.14+142~g2bd922f
> If I change mm-text-html-renderer to gnus-w3m instead of shr, notmuch-show renders this thread in the region of 3-7s, which still feels quite slow, but is an immense improvement. Setting it to lynx gives rendering times in the 2-3s ballpark, but it doesn't do bold/italic formatting, and some characters such are being rendered as escape sequences (e.g. ‘ shows up as \342\200\230). So I'll probably stick with gnus-w3m to get (barely) tolerable performance with decent rendering.
>
> Just putting this out there to maybe help the next person who gets annoyed by this slowness.
>
> Cheers,
>
> John
>
prev parent reply other threads:[~2013-04-20 3:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-20 2:59 slow rendering of some HTML mail threads in emacs/notmuch due to shr John Steele Scott
2013-04-20 3:19 ` John Steele Scott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kkt1gk$kmu$1@ger.gmane.org' \
--to=toojays@toojays.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).