In "Paddy speek", I was referring to this blog entry which more or less suggests (sort of conclusively unless its yet more FUD, dumped on previous FUD, amounting to a big fat FUD in which case I give up ;))
http://pooteeweet.org/blog/538 Maybe someone enlightened can point out what's wrong with that entry? It seems to clearly suggest __autoload makes an opcode cache less effective (only caches the file, not the class/function end result). >autoloading is not an optimization. It's not a performance feature (it >can be more or less performing depending on how many classes you have, >how they are used and what do you compare to) but it is great >convenience feature that allows you to get rid of the ugly code like >if(!class_exists('Foo')) { require 'Foo.php'} once and for good. It seems to be suggested a lot on this mailing list as an optimisation. I know it's certainly used as standard as an optimisation for non-opcode cache supporting hosts - autoloading can be a lifesaver for the unfortunate majority ;). Maybe that's not its primary goal, but it's a common perception. If it's being suggested purely to aid organisation and clean code (and someone figures out the opcode cache reality) then fire away. I haven't seen that as the main driver of the suggestion however... Regards, Paddy Pádraic Brady http://blog.quantum-star.com http://www.patternsforphp.com ----- Original Message ---- From: Stanislav Malyshev <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: Zend Framework General <[email protected]> Sent: Wednesday, January 10, 2007 6:08:15 PM Subject: Re: [fw-general] ZF and Autoloading > Because the require_once() is conditional, it's not actually seen as a > straight forward include (you can't predict whether to require the file > until that code block is executed). As a result, although the file is > cached, the class/etc. in it are done so separate to the main code. Net > result is that the cache is not as effective. In essence, autoloading Can you explain on that - do you mean that the cache you are talking about caches the whole sequence of the included files as a single block and needs to predict which files are included and which are not? Could you point to the opcode caches that act this way? IMO it's very wrong way for the opcode cache to act, but I'd like to know which ones do that. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
