all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61763@debbugs.gnu.org
Subject: bug#61763: 30.0.50; Image Cache Size growth
Date: Fri, 24 Feb 2023 22:32:49 +0100	[thread overview]
Message-ID: <874jralpfi.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <837cw6n6ap.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 24 Feb 2023 22:43:10 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> JPEG compression is very good, it routinely compresses images with
> ratios of 10:1 to 20:1.  If I use djpeg to convert the 2 MiB images I
> used into BMP, I get 36 MiB BMP files -- that's a 1:18 expansion
> ratio.  And Emacs converts each image to a pixmap for display, which
> is basically similar to what I did.  Multiply that by 20 or 30, and
> you get the numbers you see, I think.

Yes, one of the images I'm using is 3264 by 2448 pixels times 3 octets
(RGB, I guess) and we get about 23MiB... so those numbers seems ok.

> The solution is to enlarge the VM for your machine (by enlarging swap,
> for example).  If you don't keep those images displayed in windows,
> lowering image-cache-eviction-delay might also help.

In image.c line 2079, there is already a mecanism to automatically lower
this delay if the cache has grown large (so I think we're covered here).

But OTOH, at line 3010, we can see that this cache will grow no matter
what.  Maybe we should have parameter (maybe a custom) that limit this
growth up to a certain point and then start uncaching older images.
WDYT?
-- 
Manuel Giraud





  reply	other threads:[~2023-02-24 21:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 17:00 bug#61763: 30.0.50; Image Cache Size growth Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-24 17:12 ` Eli Zaretskii
2023-02-24 19:41   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-24 19:55     ` Eli Zaretskii
2023-02-24 20:27       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-24 20:43         ` Eli Zaretskii
2023-02-24 21:32           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-25  7:09             ` Eli Zaretskii
2023-02-25 12:19               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-25 13:24                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jralpfi.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=61763@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.