On Apr 18, 2004, at 2:24 PM, Marc Richards wrote:
Do the pages that get included by the __autoload() function get parsed and compiled along with the original page when using a code cache?
No, but since all the code caches cache each include file independently, it doesn't matter. The include (assuming that your __autoload() does an include) will happen, the file will get cached, etc.
I assumed that since __autoload gets called at runtime, it would be too late for the caches to do their parsing, optimizing and caching.
On the other hand I was under the impression that include()d files get pulled in at compile time and therefore get parsed and cached.
The whole point of a compiler cache is that files are included many many times. The compiler cache trys to avoid the compilation on every request after the first. ZE mixes compile and execution stages pretty fluidly (for example, an 'include' is compiled when it's statement is hit during runtime), so the time that __autoload() gets called is pretty orthogonal to a compiler cache's ability to cache things. The things a compiler cache doesn't speed up are eval()'s, because the code to be compiled is dynamic.
George
Ahh. That clears it up. Thanks George.
Marc
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php