Check out some of the discussions you will find here
http://www.google.com/search?hl=en&lr=&q=autoload+opcache&btnG=Search

Specific place to look is http://news.php.net/php.apc.dev/9

Also bug report

http://pecl.php.net/bugs/bug.php?id=8765

A comment that sticks out

"Using __autoload and require_once basically destroys any advantage apc
is likely to bring you. Mainly because you move the compilation sequence
into mid-runtime land, where the engine stops execution and proceeds to
compile stuff. "

Although from what I here the require_once issue has been solved with php 5.2



On 1/9/07, Lee Saferite <[EMAIL PROTECTED]> wrote:
Richard,

Not to doubt your statements, but that seems like the most brain dead design
you could have.
I'm not savvy on the internals of the Zend Engine and OpCode Caches, but why
wouldn't they be able to cache the classes?  Seems like a natural thing to
do to me.  As for cool and fun, I personally find the idea of autoloading
the better way of doing it.  When you start having external dependencies in
your classes, the chain-reaction loading of files can kill you.  Especially
when you do not need all the loaded files.  Anyway, could you provide some
relevant links about the opcache problems.  I've seen lots of people say the
same thing, but never any real proof.

Thanks,
Lee


On 1/9/07, Richard Thomas <[EMAIL PROTECTED]> wrote:
> Ok, so here is the thing, while autoloading might be cool and fun it
> doesn't work with OpCaches...
>
> Let me rephrase that, Your code will work but you will not see the
> full use of the opcache, this has been discussed in detail on the pear
> mailing lists and a couple other places.
>
> Basically when you load any file using a variable as the target an
> opcache can not cache that file fully because it has no idea or not if
> the next request is going to be the same file.
>
> If you want to take full advantage of opcaches from my understanding
> of the discussion you have to do
>
> require('pathtofile'); OR
require(CONSTANT_BASE_PATH.'restofpath');
>
> If any non constant value is used an opcache will not cache fully, If
> your "constant" can change each page load you might run into errors.
>
>
> Now granted this is just what I gather from the stuff I have read over
> the last 2 months, I trying to put together a good benchmark to see
> whats the story is IRL.
>


Reply via email to