Only reference I can think of was a release of APC 2.0.8 back in '05. As I recall, that version didn't play very well with __autoload on certain PHP 5.1 versions. It was fixed in 2.0.9 but the release didn't occur for some time, so word may have spread and spawned a monster...;). Pádraic Brady http://blog.quantum-star.com http://www.patternsforphp.com
----- Original Message ---- From: Shahar Evron <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, November 30, 2006 7:57:36 PM Subject: Re: [fw-general] Opcode cache [was: Shared server load times] Hi, I just made a small benchmark myself. While not completely scientific, it raises some questions: * I run the tests on my own laptop, running Linux / PHP 5.1.6 / Zend Platform. * I compared the time it takes to load and instantiate a Zend_Uri_Http and the incubator Zend_Http_Client objects. All in all, some additional 14 files are included by these two. * I created an __autoload() function calling only Zend::loadClass(). * I tested the framework the way it is, only __autoload()ing Zend_Uri and Zend_Http_Client. I got 240.27 requests per second. * I commented out all (or most of) the 'require_once' calls, letting __autoload() do the entire work. I got 342.59 requests per second. * I turned off my opcode caching by disabling Zend Platform. __autoload() was still loading the files. I got 64.30 requests per second. * I left opcode caching off, but enabled back the 'require_once' lines, so __autoload() was only loading 2 files. I got 48.50 requests per second. I think this is interesting, because despite what I've been hearing, __autoload() plays *really* nice with opcode cache, boosting baseline performance around x6 times. Also, it seems that with opcode cache __autoload is even faster then require_once(). I will run some more accurate benchmarks if people find it interesting - but I wonder where did the notion that __autoload() and opcode caching doesn't work together came from. Can anyone provide a reference or explanation? TIA, Shahar. Christian Szardenings wrote: > > Hi, > > >> Jup... >> I once heared it does not work, but had no time to proove since then. >> > > I've tested it with a site which is currently under development. The > page tested simply displays a template (using Smarty) > (tested on a DELL Xeon 2.8 GHz/1MB, 2GB Ram, SCSI 10kprm drive, under > production load). > > It seems that APC is caching the classes altough using the > Zend::loadClass stuff. > > The results (average): > > without-APC > 0.026ms > > with-APC > 0.011ms > > > > Greetings > Christian > > P.S: pprofp traces can be found here: http://neu.easyflirt.de/trace.txt > > > > > -- > bitrockers GmbH www.bitrockers.de > Moerser Str. 14a 40667 Meerbusch > T. 01805/200 248 F. 01805/200 249* > (* 12ct/min aus dem dt. Festnetz) > ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
