all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Politz <politza@hochschule-trier.de>
Cc: emacs-devel@gnu.org
Subject: Re: AW: Re: AW: Re: Free images based on allocated memory
Date: Mon, 04 Feb 2019 20:17:15 +0200	[thread overview]
Message-ID: <835ztzv2ok.fsf@gnu.org> (raw)
In-Reply-To: <p71wiawkh4v3js15ls8l6v3k.1549298138892@email.android.com> (message from Andreas Politz on Mon, 04 Feb 2019 17:42:32 +0100)

> Date: Mon, 04 Feb 2019 17:42:32 +0100
> From: Andreas Politz <politza@hochschule-trier.de>
> Cc: emacs-devel@gnu.org
> 
> The patch limits the amount of memory Emacs may use for an image-cache.  This if what my users want and
> it means I don't have to implement it in Lisp.  So, given the cache has still vacancy left, I can preload not yet
> displayed images into it knowing they stay there.  Using the existing time-based mechanism doesn't really
> work here:  Either  the limit is to short and thus pre-loaded images are evicted before they can be displayed.
> Or it is to long and the image-cache becomes undesirable large.

Did you try this code when there's only one or two large images being
displayed in some window, such that each one of the images
individually exceeds the memory limit set by the variable your patch
introduces?  Doesn't this cause Emacs to constantly free and then
immediately re-process the image again and store it in the cache,
e.g., as you scroll the window to bring the image in and out of view?

Please also note that I installed a change today that prevents a
frame's image cache from being altered while the display engine works
on that frame.  This caused Emacs to segfault in some convoluted
situation.

Thanks.



      reply	other threads:[~2019-02-04 18:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 16:42 AW: Re: AW: Re: Free images based on allocated memory Andreas Politz
2019-02-04 18:17 ` Eli Zaretskii [this message]

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=835ztzv2ok.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=politza@hochschule-trier.de \
    /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.