GNU bug report logs - #56546
29.0.50; unbounded RAM comsumption when displaying images

Previous Next

Package: emacs;

Reported by: "Jose A. Ortega Ruiz" <mail <at> jao.io>

Date: Thu, 14 Jul 2022 01:36:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 56546 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mail <at> jao.io, 56546 <at> debbugs.gnu.org
Subject: Re: bug#56546: 29.0.50; unbounded RAM comsumption when displaying
 images
Date: Thu, 14 Jul 2022 11:20:53 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> When we remove an image from the cache, its animations should also be
> removed, I agree.

The image cache is for displayed images, so an animated image will
usually have dozens of image cache entries, so it doesn't work that way.

> GC could be problematic.  Imagine someone who has a frame displayed at
> all times animating something -- you don't want to clear those caches,
> right?

No, but the cache should be pruned of old entries.  (Which is what the
pruning function does.)

>> Finally, image-cache-size should also report the animation cache size, I
>> think.
>
> That'd help, yes.

Looking at that now, that's easier said than done, because the animation
caches are opaque -- we call out to support libraries, and it doesn't
look like all of them have a way to say how much memory they use.  (I'm
looking at the webp functions right now...)

But we can at least include the size of the main data blob (e.g., the
.webp data itself); we know the size of that for all the anim caches.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.