Re: allfiles.php has nothing to do with performance - please read the proposal CAREFULLY

From: Date: Mon, 27 Aug 2007 20:58:10 +0000
Subject: Re: allfiles.php has nothing to do with performance - please read the proposal CAREFULLY
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47874@lists.php.net to get a copy of this message
Alexey Borzov wrote: > 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*" It appears this was a confusion on one of the editor's part (http://wiki.pear.php.net/index.php?title=PEAR2_Standards&diff=169&oldid=156), I was not aware the language had been changed. I understand now why everyone is saying this! I have edited the standards to remove this statement, thanks for pointing it out. >> 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 out > > A better solution would be to provide a "one file - one package" > distribution or a phar file. This makes a great deal of sense to me, and it does solve the problem in a better way than allfiles.php. > >> 2) advanced users who wish to see which files are within a package can >> use it to decide which files they wish to include directly > > They can also do this by a simple > var_dump(get_included_files()); > at the end of the script, why mandate a useless extra file? with your suggestion above, it does become useless, although for a phar distribution it would still be needed as an index file in order to include the internal files, but this could easily be generated from package.xml. > > >> 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? Sure, I'll do this under a new thread. I want to compose this message carefully, so it may be a few days. Greg

« previous php.pear.dev (#47874) next »