Re: Zend Optimizer+ Source Code now available
| From: | Stas Malyshev | Date: | Fri, 15 Feb 2013 19:38:46 +0000 |
| Subject: | Re: Zend Optimizer+ Source Code now available | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65882@lists.php.net to get a copy of this message | ||
Hi!
> Put simply PHP extensions should only reference the APIs exposed in the
> php headers. Zend has its own interface and extensions and since a Zend
> Opcode cache is SO intimately coupled with the Zend environment it makes
> sense to use a Zend extension to implement this. The whole idea of
OK, I see. Well, the difference between Zend ext and PHP ext is not that
big, it's mostly just loading order and couple of hooks, of which I
think O+ really uses only op_array_handler, and this for optimization's
benefit - so if you separate optimization, I think O+ can live as PHP
extension, maybe. Not sure if it's worth the trouble though.
> Now to ZEND_INCLUDE_OR_EVAL. My rationale here is that if the admin has
> specified a stat=0 (or equiv) option then this is a statement that the
> caches content and metadata can be trusted so there is no point in
> examining or reading source files. However, in the case of the xxx_once
> variants of this instruction, the
> ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER() does path resolution and in
> the case of first load opens the source stream. Why? Why not just
I see what you mean. I can't think of a reason why they are combined
now. Before realpath cache and separate path resolution functions that
was the only way to handle paths properly - since path can be resolved
differently by different streams, etc. I think giving a fresh look to
this API and seeing if we can improve it for 5.6, etc. would probably be
a good idea.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227