emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Free images based on allocated memory


From: Eli Zaretskii
Subject: Re: Free images based on allocated memory
Date: Wed, 30 Jan 2019 17:46:02 +0200

> From: Andreas Politz <address@hidden>
> Date: Tue, 29 Jan 2019 19:56:45 +0100
> 
> Recently there was a discussion about how to limit the amount of memory
> the pdf-tools package uses by means of the image-cache.
> 
> The package renders pages to a PNG image, each one having a size of a
> couple of MB.  Thus, skimming through a large document can quickly fill
> the cache with images in the GB range.
> 
> Anyway, it occurred to me, that freeing the cache via clear-image-cache
> etc. is much like counting conses and triggering garbage-collection
> manually.  So I wondered if there is some interest to add an automatic
> eviction of the cache based on it's current size.

We already clear the image caches from time to time, see
clear_face_cache.  If that is not good enough for some reason (and if
so, can you explain why?), would it make sense to enhance what we
already have, rather than invent a new mechanism?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]