gnump3d-devel
[Top][All Lists]
Advanced

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

Re: [Gnump3d-devel] Caching downsampled files


From: Mark Schouten
Subject: Re: [Gnump3d-devel] Caching downsampled files
Date: Fri, 12 Mar 2004 09:48:06 +0100
User-agent: Mutt/1.3.28i

On Thu, Mar 11, 2004 at 11:03:21PM -0500, Adam Di Carlo wrote:
> Mark Schouten <address@hidden> writes:
> 
> > I tested the downsampling off files recently, and it seems to work
> > properly. Since the downsampling itself requires a quite large amount
> > of CPU-time, I changed my GnuMP3d so that it is cached.
> >
> > If a cached version is found, it is directly read from disk. You can
> > setup the needed configurationvariables in the gnump3-configfile.
> >
> > Attached is the diff. What do you think?
> 
> Seems like a good idea, but does the cache expire after a while?

You can set a value for maximum diskusage. If that maximum is reached,
the oldest files should be removed. It's all in my head, I only have to
write that part. :)

        if ($cachesize > ($down_cache_limit*1024*1024)) {
                print "Shit, cache is to big. Write something to clean up!";
                print "Cache is $cachesize bytes. ". 
$down_cache_limit*1024*1024 ." is allowed.\n";
        } else {
                print "Cache is $cachesize bytes. ". 
$down_cache_limit*1024*1024 ." is allowed.\n";
        }

> I don't see any check whether the source file has changed, and if so,
> remove or regenerate the cached copy.

Hmm. Well, since I don't really change my MP3's very often, I don't really see
the use of this. But maybe in a 'new' version, I'll look into that.
 
Mark

-- 
Mark Schouten
Read my rules of email-engagement: http://prevented.net/email-rules.html




reply via email to

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