From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Image cache Date: Sat, 11 Feb 2006 19:47:52 -0500 Message-ID: <87pslte77n.fsf-monnier+emacs@gnu.org> 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 1139715531 11700 80.91.229.2 (12 Feb 2006 03:38:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 03:38:51 +0000 (UTC) Cc: Juri Linkov , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 04:38:47 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 1F884P-0001mb-PZ for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 04:38:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F884N-0002mc-R3 for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2006 22:38:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F85Sm-0003UX-Mz for emacs-devel@gnu.org; Sat, 11 Feb 2006 19:51:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F85Si-0003Qq-D9 for emacs-devel@gnu.org; Sat, 11 Feb 2006 19:51:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F85PJ-0001vh-Qm for emacs-devel@gnu.org; Sat, 11 Feb 2006 19:48:06 -0500 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F85TJ-00052t-NB; Sat, 11 Feb 2006 19:52:13 -0500 Original-Received: from alfajor ([67.68.216.244]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060212004754.NMIG18394.tomts5-srv.bellnexxia.net@alfajor>; Sat, 11 Feb 2006 19:47:54 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id A156DD7370; Sat, 11 Feb 2006 19:47:52 -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:50384 Archived-At: > 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 there would have to be some sort of counter/timer, > e.g., only stat if more than 30 seconds since the last stat. However > as the stat info would give you time information anyway, that should > be relatively straightforward. The timeout is fairly arbitrary, so it's invariably turn out to be unnecessarily short for half the cases and too long for the other half. I much prefer an explicit way to force a check, which can be used in create-image. And in those rare cases where the image may change without Emacs being directly involved, then a run-with-idle-timer can implement the timeout. Stefan