Req #68048 [Opn->Sus]: [feature request] auto_prepend_file has "preload" mode
| From: | stas@php.net | Date: | Sat, 05 Aug 2017 04:56:00 +0000 |
| Subject: | Req #68048 [Opn->Sus]: [feature request] auto_prepend_file has "preload" mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210521@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68048&edit=1
ID: 68048
Updated by: stas@php.net
Reported by: simonhf at gmail dot com
Summary: [feature request] auto_prepend_file has "preload"
mode
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: *General Issues
PHP Version: 5.4.32
Block user comment: N
Private report: N
New Comment:
Thank you for your interest in PHP and for submitting a feature request. Please be aware that due to
the magnitude of change this request requires, it would be necessary to discuss it on PHP Internals
list (internals@lists.php.net) as an RFC. Please read the guide about creating RFCs here:
https://wiki.php.net/rfc/howto
If you haven't had experience with writing RFCs before, it is advised to seek guidance on the
Internals list (http://php.net/mailing-lists.php) and/or solicit help from one of the experienced
developers.
Please to not consider this comment as a negative view on the merits of your proposal - every
proposal which requires changes of certain magnitude, even the very successful and widely supported
ones, must be done through the RFC process. This helps make the process predictable, transparent and
accessible to all developers.
Previous Comments:
------------------------------------------------------------------------
[2014-09-18 22:24:44] simonhf at gmail dot com
Description:
------------
My PHP scripts include dozens of PHP files. Caching technologies like APC and opcache make this
happen faster. However, it's the same include files that get included over and over again with
every Apache HTTP request. The Apache child process only starts to include all the files once the
HTTP request is being serviced. This means that even with the acceleration provided by APC &
friends, there is still an overhead to load all the files. APC & friends just make the overhead
e.g. half as much.
Request: Modify auto_prepend_file so that it prepends *before* the HTTP request is serviced. This
means that once the HTTP request is made, the Apache child process already has the auto_prepend_file
included files parsed and included (thus saving time), and then continues to parse and include the
regular PHP script(s) to service the request.
Such a mechanism would be similar to the preload [1] mechanism in mod_perl.
Does this save CPU or RAM? No. Does it make the HTTP request faster from the perspective of the
client? Yes, if Apache can keep ahead of the client request rate, i.e. always have a child process
ready to go with preloaded PHP include files.
[1] http://perl.apache.org/docs/1.0/guide/performance.html#Preloading_Perl_Modules_at_Server_Startup
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68048&edit=1