Subject: bug#67810: 29.1; fonts use synthetic bold on Linux / pgtk

From: Manuel Giraud <[email-masked]>
Date: Sun, 14 Jan 2024 13:21:42 +0100

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> I'll take your word for it.  Do you understand why this happens?
>
> Each time an SVG image is loaded, a bitmap the size of the scaled image
> is allocated and cached, then copied onto the frame whenever the SVG
> must be displayed.  This bitmap is retained for 300 seconds, during
> which any number of other bitmaps might be allocated, which eventually
> come to occupy most available X server memory.
>
> The same goes for other image formats in principle, but in practice SVG
> images are the most susceptible to runaway memory consumption, since the
> dimensions of the bitmap cached in the course of displaying an SVG image
> match its dimensions on-screen, which can be quite the beast on dense
> displays or when scale factors are enabled for related reasons.
>
>> What can we do to improve the situation?
>
> A shorter default image cache retention time, without question, and
> perhaps better criteria for deciding when to flush it.

Yes.  As Eli explained to me in bug#68006 (correct me if I'm wrong), the
image cache was designed to work with the display engine (for icons and
toolbars).  For other usage, like image-mode for instance, we might need
something else.
-- 
Manuel Giraud