Re: [Coding Standards] Loading all files at once
| From: | Joshua Eichorn | Date: | Tue, 10 Jul 2007 16:43:57 +0000 |
| Subject: | Re: [Coding Standards] Loading all files at once | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47409@lists.php.net to get a copy of this message | ||
Matthew Weier O'Phinney wrote:
On 7/9/07, Joshua Eichorn <josh@bluga.net> wrote:-joshTravis Swicegood wrote:Joshua Eichorn wrote:Obviously we can't meet everyones needs, but we do want a solution that is better then the current one. An allfiles.php approach might not be that, but obviously status quo isn't any better either.Actually, I think you can meet the needs of everyone. From the benchmark tests I ran, it looks like you can easily have the allfiles for the performance geeks and have all of the currently existing require_once declarations at the top of the file. My tests showedthatit was more efficient to do the second request through a require_once than through an if(!class_exists()), so I don't see an issue. Remove the text disallowing all require_once statements, and addcode toPyrus to generate an allfiles.php file. I imagine Greg's going tohaveit know what type of package it's preparing, so it will be extremely easy for it to create the necessary require_once statements, and for that matter inject the dirname(__FILE__) call into all of the require_onces throughout the code when it creates the unzip and goinstalls.Can you show an example of what the file would look like. If your talking about something like: if (!class_exists('Class_Name')) { require 'filename'; }Josh, Travis has shown that replacing the above with require_once is *faster*. Why do you keep insisting on this even in the light of concrete benchmarks? I missed that benchmark, you can ignore that comment.