Req #68048 [NEW]: [feature request] auto_prepend_file has "preload" mode

From: Date: Thu, 18 Sep 2014 22:24:45 +0000
Subject: Req #68048 [NEW]: [feature request] auto_prepend_file has "preload" mode
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187594@lists.php.net to get a copy of this message
From: simonhf at gmail dot com Operating system: PHP version: 5.4.32 Package: *General Issues Bug Type: Feature/Change Request Bug description:[feature request] auto_prepend_file has "preload" mode 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 bug report at https://bugs.php.net/bug.php?id=68048&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68048&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68048&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68048&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68048&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68048&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68048&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68048&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68048&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68048&r=support Expected behavior: https://bugs.php.net/fix.php?id=68048&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68048&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68048&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68048&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68048&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68048&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68048&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68048&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68048&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68048&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68048&r=mysqlcfg

« previous php.bugs (#187594) next »