Re: [need for advices] fastCaching

From: Date: Mon, 22 Jul 2002 13:33:41 +0000
Subject: Re: [need for advices] fastCaching
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7846@lists.php.net to get a copy of this message
(Tomas) > I guess that just isolating the container isCached() functions into a > light layer would multiply the speed factor. Ok, I'm just finishing benchs. I use this minimalist layer for tests. Cache/Container/file.php : <?php class Cache_Container_file { function isCached() {return true;} function isExpired() {return false;} function load() {return '123';} } ?> Note that the cache doesn't work because the load() method return always '123'. Of course, before benching with this minimalist layer, I made a 'one hour file cache' with the correct version. Results : --------- - fastCache : 150 requests / second - Cache : 30 requests / second - Cache with minimalist layer : 55 requests / second (and the Cache doestn't work, there is no file read) So I think that this is not a solution. Maybe it's possible to lightly improve perfs by making two layers (one very light for mosts cases where there is a cache file, and another when there is no cache). But certainly not do a big perfs jump without changing the conception. And it would be a mistake to change completly PEAR/Cache because we would loose its advantages : flexibility, more powerfull... So why not a new cache class perfs oriented ? They don't exclude themselves. Thanks, Fabien

« previous php.pear.dev (#7846) next »