Subject: Re: bug#51763: 27.2; Displaying many images take all memory

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 12 Nov 2021 04:30:18 +0100

Stefan Kangas <[email-masked]> writes:

> Should we perhaps also add a max cache size in addition to the
> `image-cache-eviction-delay'?  I find it easy to get memory usage up to
> several GiB when viewing large images, and all that happens in less than
> five minutes.  (That would be a separate feature request though, as this
> bug is about the memory usage regression introduced in Image-Dired.)

The question is then how to tune it -- if it's mistuned, it may result
in catastrophic thrashing if you're showing a buffer with a gazillion
images...

> Relatedly, image-mode could be smarter, and evict images manually from
> the cache.  Let's say that when flipping through images in a directory,
> we only keep the previous N images (where N is, like, 5 or something).

Yes, that sounds like a good idea.

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