Stefan Priebsch wrote:
> Hi Ramus,
> 
> Rasmus Lerdorf schrieb:
>> Note that what you are saving by combining the files into one is just a
>> single stat syscall per file.  And that can be alleviated by setting
>> apc.stat=0 in your config.  That of course means you need to restart
>> your server or flush your cache whenever you want to update the files.
>> In apc.stat=0 mode you gain nothing by merging all the files.
> 
> Hmmm, in earlier posts of yours (BTW, there was quite some confusion
> about those, I believe) you mentioned that/how cache-unfriendly
> conditional includes (i.e. autoload) were. Are we talking about new APC
> development here or did I misread your earlier comments on caching?

That's a completely separate subject.  Any time a class or function is
conditionally defined, it cannot be cached and the opcodes to create the
class or function must be run on each request because we need the
execution context to determine whether or not the class or function
should exist.  This has absolutely nothing to do with whether or not
they are in an include file.  You can get a conditional function simply
by doing:

  if($foo) {
    function bar() { }
  }

Or you may get it by conditionally including the file that defines it.
Note that the opcodes are still cached, it just means that the executor
has a bit more work to do on each request.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to