So that's a good thing as far as, say, the Zend_Exceptions go? It means that because they're not part of normal program execution so they shouldn't be require'd in the first place, only when they're thrown. And because it's not normal execution the speed hit is less of an issue.

Which then means, I guess, that other components should be looking at exactly where their requires take place, rather than simply at the top of each class definition?

I think its basically saying that autoloading takes place after the script is compiled and while it's being executed (i.e. at runtime when PHP figures out a class is needed and not yet loaded, and so runs off to do so). Since the autoloaded files are not caught during compilation, it causes a headache for opcode caches.

That's a bit of a bummer...

I think this means an opcode cache would still improve things - the file is cacheable, just not the actual class it contains.

--

Simon Mundy | Director | PEPTOLAB

""" " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com


Reply via email to