Re: [PHP4BETA] Trouble with Oprimizer
| From: | Zeev Suraski | Date: | Sat, 01 Apr 2000 11:59:42 +0000 |
| Subject: | Re: [PHP4BETA] Trouble with Oprimizer | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12978@lists.php.net to get a copy of this message | ||
Bytecode is a nice buzzword, but writing a byte code generator, which
obviously also means you have to write a complmenting virtual machine, is
several man-years of work. And, since it's not suitable for realtime
execution, it would have to be in addition to the existing facilities
inside PHP/Zend. In short, that's unlikely to ever happen.
However, generating bytecode has little to do with the problem Chris
raised. If you could save the compiled representation (which is not
bytecode) of a PHP script in memory, that would solve your problem. Zend
Tech has already announced the Zend Cache, you can read about it on the
web site.
Zeev
On Sat, 1 Apr 2000, Andreas Pour wrote:
> Chris Chabot wrote:
> >
> > My main question would be, how large is this script? ive found that in many
> > cases, loading & preparsing a large code base is the main bottleneck, and
> > not the script execution time.
> > As im sure uve read in the description of the optimizer, its a _multi
> > parse_ optimizer, so the script load time only increases. Ive got the same
> > problem here with a 140Kb script :)
>
> What would be awesome is a facility to convert php scripts to bytecode.
> It's an avoidable waste of resources to be parsing the same large
> scripts every time someone hits a page. Anyone have an idea know how
> hard it would be to add a bytecode generator/parser into the php
> frontend (it could even automatically check timestamps to make sure the
> bytecode is newer than the script)? Probably the better place to put
> the bytecode generator is in Zend engine (post-optimization), but the
> license seems to be unfavorable.
>
> Ciao,
>
> Andreas
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/