Re: Re: Benchmark results for require vs require_once with and without APC(hard numbers for the allfiles.php debate)
| From: | Alexey Borzov | Date: | Fri, 13 Jul 2007 19:39:13 +0000 |
| Subject: | Re: Re: Benchmark results for require vs require_once with and without APC(hard numbers for the allfiles.php debate) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47482@lists.php.net to get a copy of this message | ||
Hi,
Philippe Jausions wrote:
I ran a set of benchmark tests, using a pretty simple real-life-like sample application and using multiple parameters: with/without opcode cache, allfiles, "traditional" require_once, and a PEAR2_Load class loader. http://pear.11abacus.com/dev/PEAR2_Benchmark/results.html == Conclusion: To get the best performance use an opcode cache combined with an allfiles.php and all *_once removed from the code. Without an opcode cache, the original PEAR packages fared well, as long as the class name <-> file name rule is respected. Note how the "require_once" test changes raking goes from fastest to almost slowest whether or not that rule is followed on just one package.Dunno whether you used the same PEAR2_Load that's linked from the results page, but the one linked has an error: $basePath is used instead of proper self::$basePath throughout loadClass method. Also it would be interesting to play with apc.stat and apc.include_once_override configuration parameters.