GNU bug report logs - #38187
27.0.50; No mouse-wheel scaling on images

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 12 Nov 2019 21:11:02 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, stefan <at> marxist.se, 38187 <at> debbugs.gnu.org
Subject: Re: bug#38187: 27.0.50; No mouse-wheel scaling on images
Date: Fri, 22 Nov 2019 00:57:24 +0200
>> BTW, while testing it for image scaling on a quite small image file,
>> Emacs consumed several GB of all available memory and almost all swap,
>> before I noticed and evaluated M-: (clear-image-cache) that freed memory.
>>
>> Memory leak?
>
> No, it's just that Emacs' image cache is very primitive.  You can easily
> get Emacs to go out-of-memory by just doing a
>
> (dolist (file (directory-files dir-with-lots-of-images))
>   (erase-buffer)
>   (insert-image (create-image file)))
>
> You get the same effect by altering the scaling factor, I think?  Each
> scaled image is cached?  So by rolling the wheel ten clicks you get ten
> cached copies of the image.
>
> A better eviction algorithm would be nice.

Currently the default value of image-cache-eviction-delay is
300 seconds.

But the documentation also says:

  "If the cache contains a large number of images,
   the actual eviction time may be shorter."

And code has this comment:

  /* If the number of cached images has grown unusually large,
     decrease the cache eviction delay (Bug#6230).  */

Does this mean the number of cached images was not large enough?




This bug report was last modified 5 years and 238 days ago.

Previous Next


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