[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image cache

From: Miles Bader
Subject: Re: Image cache
Date: Sat, 11 Feb 2006 08:21:36 +0900

On 2/11/06, Richard M. Stallman <address@hidden> 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 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.

[Maybe the timeout should also  be an image parameter (for some uses,
e.g. icons in the mode-line, one may not care enough to pay the
expense of statting at all); one can also imagine an adaptive timeout,
which would stat more often if the file had been noticed to change
recently, which might work better for images being updated in the

Do not taunt Happy Fun Ball.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]