Re: allfiles.php has nothing to do with performance - please read the proposal CAREFULLY
| From: | Alexey Borzov | Date: | Mon, 27 Aug 2007 14:15:18 +0000 |
| Subject: | Re: allfiles.php has nothing to do with performance - please read the proposal CAREFULLY | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47868@lists.php.net to get a copy of this message | ||
Hi,
Gregory Beaver wrote:
Several people have mistakenly cited allfiles.php as a performance-based decision. It is not.Maybe that's because *you* claim that it is a performance based decision? http://wiki.pear.php.net/index.php/PEAR2_Standards#Loading_all_files_at_once "PEAR2/PackageName/allfiles.php is the "load all classes at once for easy startup and *opcode caches friendliness*"
The purpose of allfiles.php is to provide a vector to do two things: 1) beginners who just want to see how a package works and do not yet have PEAR installed can simply use this procedure to try a package outA better solution would be to provide a "one file - one package" distribution or a phar file.
2) advanced users who wish to see which files are within a package can use it to decide which files they wish to include directlyThey can also do this by a simple var_dump(get_included_files()); at the end of the script, why mandate a useless extra file?
It serves no useful performance purpose, and is likely to be slower than both require_once and __autoload() for complex packages because more files are loaded.From the very beginning I asked to see a complete list of the supposed "problems" this RFC is "addressing". There was an extremely lame attempt at doing so http://wiki.pear.php.net/index.php/Pear2_require but nothing better yet. Greg, maybe you'll finally start from the very beginning and outline the problems before presenting the solutions to them?