Re: Patch for opcode caches

From: Date: Fri, 14 Mar 2008 16:51:49 +0000
Subject: Re: Patch for opcode caches
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-36143@lists.php.net to get a copy of this message
But that means we are compiling inheritance when a file is loaded form the cache. The goal should be to compiling inheritance when writing to the opcode cache file. All we achieve here is a slow down. If there is
You can not do that. You do not know that until runtime.
something that makes this required than at least we need to warn the user about the slow code. I Think what we need to do is deprecating class and
It won't be slow. It would be much faster (in some cases 10x faster). This specific assembly of instructions might be slower in some cases, but the code altogether will be faster. That's the idea of the opcode caches.
namespace use in non main blocks as well as include and require in non main blocks. And if there is no such case than everything can be bound early which is the fast state we should aim for.
We do not need to deprecate anything, and inheritance can not be bound before parent class is known, which in the case of bytecode cache means - not before the file is loaded from the cache. That's exactly what this patch enables. It does not change performance characteristics of neither cached not non-cached code, it just makes it much simpler and working in all cases. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#36143) next »