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: Tue, 07 Feb 2006 12:21:30 -0500 Message-ID: <87mzh3krtx.fsf@stupidchicken.com> References: <87bqxjjwii.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 1139338090 21223 80.91.229.2 (7 Feb 2006 18:48:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2006 18:48:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 07 19:48:05 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 1F6XsX-0001tL-BY for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2006 19:47:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6Xn4-0000NW-F2 for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2006 13:42:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F6WaS-0003ET-TH for emacs-devel@gnu.org; Tue, 07 Feb 2006 12:25:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F6WaJ-0003Dd-Rb for emacs-devel@gnu.org; Tue, 07 Feb 2006 12:25:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6WaJ-0003DY-N3 for emacs-devel@gnu.org; Tue, 07 Feb 2006 12:24:59 -0500 Original-Received: from [18.95.6.197] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F6Wa4-0003ED-Ge for emacs-devel@gnu.org; Tue, 07 Feb 2006 12:24:44 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 61B0C1E41D4; Tue, 7 Feb 2006 12:21:30 -0500 (EST) Original-To: Juri Linkov In-Reply-To: <87bqxjjwii.fsf_-_@jurta.org> (Juri Linkov's message of "Tue, 07 Feb 2006 12:52:45 +0200") 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:50162 Archived-At: Juri Linkov writes: > After generating different images in the same file and visiting them after > every change in Emacs, I noticed that the displayed image doesn't > get updated... 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. Ugh. Two simple solutions come to mind: (i) revert my change, or (ii) clear the image cache on each call to image-toggle-display. I don't know which is worse, performance-wise -- any suggestions? We could change the cache code for file image specs so that the file modtime in included in the image hash. But this can probably wait for after the release -- for now, we can always call `clear-image-cache' wherever changes to image files can be a problem. (Aside from image-mode, I don't know where else the image cache would be a problem.)