Subject: Re: bug#77961: 31.0.50; Rendering HTML email is very slow since commit #eab14d68b2e72b9a6b8b0cc67c9667c2bfbed4f5

From: Eli Zaretskii <[email-masked]>
Date: Wed, 23 Apr 2025 16:21:34 +0300

> Date: Wed, 23 Apr 2025 08:17:29 +0200
> Cc: [email-masked], [email-masked], [email-masked]
> From: martin rudalics <[email-masked]>
> 
> 'save-window-excursion' should be banned.  Its reminder
> 
>    BEWARE: Most uses of this macro introduce bugs.
> 
> is much too mild in my opinion.  AFAICT the first two calls in shr.el
> could be avoided by using 'buffer-text-pixel-size'.  The one in
> 'shr-render-td-1' looks worse - since it calls 'shr-pixel-buffer-width'
> it nests one 'save-window-excursion' call into another which is simply
> evil.

Thanks.  Patches welcome to avoid using save-window-excursion in
shr.el.