From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Image cache Date: Fri, 10 Feb 2006 21:14:45 -0500 Message-ID: <877j82od4a.fsf@stupidchicken.com> References: <87bqxjjwii.fsf_-_@jurta.org> <878xsmewfo.fsf-monnier+emacs@gnu.org> <87fymsfj7v.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139624123 22570 80.91.229.2 (11 Feb 2006 02:15:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2006 02:15:23 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 03:15:21 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F7kIA-0005Bf-AB for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2006 03:15:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7kI9-0004WH-IP for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2006 21:15:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F7kHq-0004Vm-Hs for emacs-devel@gnu.org; Fri, 10 Feb 2006 21:14:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F7kHo-0004VM-8O for emacs-devel@gnu.org; Fri, 10 Feb 2006 21:14:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7kHo-0004VG-5k for emacs-devel@gnu.org; Fri, 10 Feb 2006 21:14:56 -0500 Original-Received: from [18.95.6.197] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F7kLY-0003Tr-P6; Fri, 10 Feb 2006 21:18:48 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 3AA361E4308; Fri, 10 Feb 2006 21:14:45 -0500 (EST) Original-To: Miles Bader In-Reply-To: (Miles Bader's message of "Sat, 11 Feb 2006 08:21:36 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50350 Archived-At: Miles Bader writes: > On 2/11/06, Richard M. Stallman wrote: >> But it is a bug that the image cache doesn't get updated when the image file >> content changes. Is there an easy way to fix it? >> >> Fixing this would be desirable. One way to do it would >> be to store the file's modtime in the image cache. >> Then any reference to the cache could stat the file >> to see if it has changed, and reload it if necessary. >> >> That is pretty simple in theory. Is it simple in practice? > > One certainly doesn't want to do a stat on _every_ reference, as stats > can be expensive (and the thumbs package will tend to use lots of > images) I think a good way to do it is to provide a function that Lisp programs can use to reload a specific cached image (rather than the entire cache).