Subject: bug#78739: 30.1; Performance issue with inline image in an org file

From: Eli Zaretskii <[email-masked]>
Date: Tue, 10 Jun 2025 14:33:28 +0300

> Date: Mon, 09 Jun 2025 19:23:56 +0000
> From:  laladrik via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Hello,
> 
> I've been experiencing performance issues with displaying inline images in Org
> files.

Is it necessary to reproduce in an Org buffer?  Can you reproduce in a
"normal" buffer that is in Fundamental mode?

In any case, please post a complete recipe, starting from "emacs -Q",
that reproduces the problem on your system, because what you say below
is too vague to follow (I tried method 1, but couldn't reproduce).

> This happens only if an image is resized.

What does this mean?  Can you elaborate?  In particular, does this
happen with any image file and type, or just with certain ones?

> The init.el needed to reproduce has just one line:
> 
>     (setq org-image-actual-width 1000)

And how to recreate a buffer where the problem happens, after starting
with this customization?

Finally, if this happens only in Org buffers, it could make sense to
report this to Org developers first.  The fact that redisplay_internal
is the hot spot doesn't mean the bug is there: it could be something
Org does in this case which forces redisplay to work very hard.