Hi Dmitry

On Tue, Apr 17, 2018 at 5:44 PM, Dmitry Stogov <dmi...@zend.com> wrote:

> Hi Jakub,
>
>
> I though not only about FPM, but a technology for any SAPI.
>
> Pre-loaded classes and functions might be kept in CG() tables, in the same
> way as "internal" ones.
>
> EG() constants and variables may be re-created at start of request,
> executing pre-loaded PHP code.
>
> Few years ago, I developed something similar for PHP-5.
>

Yeah that's what I kind of meant by the engine support. :) My idea was more
about when it should be preloaded. For example one option would be to
preload it automatically if nothing has been preloaded as part of
php_execute_script / zend_execute_script. However that would mean to do it
for each child (basically use it for all request for the child process
life). It should work and might be a viable options for the initial
implementation but more optimal would be do it once for all children
running in the same pool which could be doable using the pool managers. I
think it would be great to have some kind of API so the SAPI can explicitly
preload the script.

Cheers

Jakub

Reply via email to