unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Image cache
Date: Tue, 07 Feb 2006 15:59:29 -0500	[thread overview]
Message-ID: <878xsmewfo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87bqxjjwii.fsf_-_@jurta.org> (Juri Linkov's message of "Tue, 07 Feb 2006 12:52:45 +0200")

> OTOH, I don't see why I should change the value of image-cache-eviction-delay,
> if it is Emacs' job to update the cache when the image data changes.
> So I found that updating the image cache after visiting an new image
> was correct before the 2006-01-30 change in image-mode.el:

> 	* image-mode.el (image-toggle-display): Use file name if possible,
> 	instead of unnecessarily allocating a (possibly huge) lisp string.

> But I don't blame this change.  It is a good optimization, but it
> revealed a problem in cache processing code.  This code doesn't update
> the cache for the file name when the file contents changes.

If someone has the time, it seems it migt be worth it to do something along
the following lines:

- add `loadtime' timestamp to the image data-structure so that staleness can
  be detected and a `refresh' function in the image_type data structure
  which, given the `loadtime' image `spec' says whether to reload or not.
- provide a new function (image-refresh IMAGE-SPEC).
- make create-image (used by image-toggle-display and others) use that
  new function.


        Stefan

  parent reply	other threads:[~2006-02-07 20:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-07 10:52 Image cache Juri Linkov
2006-02-07 17:21 ` Chong Yidong
2006-02-08  7:22   ` Mathias Dahl
2006-02-08  9:23   ` Juri Linkov
2006-02-14  1:48     ` Juri Linkov
2006-02-07 20:59 ` Stefan Monnier [this message]
2006-02-09 17:48   ` Richard M. Stallman
2006-02-09 19:18     ` Juri Linkov
2006-02-09 22:12       ` Chong Yidong
2006-02-09 22:51       ` Mathias Dahl
2006-02-10  0:10       ` Miles Bader
2006-02-10 23:02       ` Richard M. Stallman
2006-02-10 23:21         ` Miles Bader
2006-02-11  1:18           ` Juri Linkov
2006-02-11  2:14           ` Chong Yidong
2006-02-11 21:59             ` Miles Bader
2006-02-12  0:47           ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2008-12-15  1:26 Memory leak in keyboard variables? Kenichi Handa
2008-12-15  3:16 ` Chong Yidong
2008-12-15  4:06   ` image cache (was: Memory leak in keyboard variables?) Stefan Monnier
2008-12-15  4:12     ` Eli Zaretskii
2008-12-15 15:19       ` image cache Stefan Monnier
2008-12-15 16:08         ` Chong Yidong
2008-12-15 20:09           ` Stefan Monnier
2008-12-16  1:41           ` Miles Bader
2008-12-16  4:56             ` Chetan Pandya
2008-12-16  7:02               ` Chetan Pandya

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=878xsmewfo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).