Re: Benchmarking PHPA and Cache_Lite
| From: | Mika Tuupola | Date: | Wed, 12 Feb 2003 18:18:08 +0000 |
| Subject: | Re: Benchmarking PHPA and Cache_Lite | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13201@lists.php.net to get a copy of this message | ||
On Wed, 12 Feb 2003, Fabien MARTY wrote:
> I think that Cache_Lite can be really faster. If you have a look at the
> Cache_Lite code (or technicals docs), you will note that I don't include
> PEAR.php for speed reason ! Indeed, the inclusion is dynamic (with
> include_once and not require_once) when an error occured but PEAR.php
> isn't included in most cases. With this system, the speed jump is very
> important.
You're quite right. Moving the requires as an include inside
a conditional block and icluding extra stuff only when
necessary doubled performance even more.
ab -n 1000 -v 3 -c 10 http://www.example.com/test/select_1000_cached2.php
new results (original numbers in braces)
Time taken for tests: 15.295 seconds (30.357 seconds)
Requests per second: 65.38 (32.94)
Transfer rate: 4351.54 kb/s received (2195.52 kb/s)
--
Mika Tuupola http://www.appelsiini.net/~tuupola/