Re: [Coding Standards] Loading all files at once

From: Date: Tue, 10 Jul 2007 13:28:17 +0000
Subject: Re: [Coding Standards] Loading all files at once
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47386@lists.php.net to get a copy of this message
On 7/9/07, David Coallier <davidc@php.net> wrote:
On 7/9/07, Paul M Jones <pmjones@ciaweb.net> wrote: On Jul 9, 2007, at 5:26 PM, Joshua Eichorn wrote:
Paul M Jones wrote:
The proposed coding standard states:
Loading all files at once
It may be that "allfiles" *is* the right solution ... but to exactly what set of problems, well, I'm still not clear on that, and it appears I'm not alone. PHP's performances and poor require_* performances (See below) At worst, it seems like that portion of the standard should be marked as "tentative" or "subject to further discussion". In some previous projects I have worked on (Over 20M users), having multiple files and using require_once into many many files is a problem. let's say 15 interfaces (low count) and 15 classes using the interfaces, you need to require_once somefile in the interfaces sometimes as well. That's when the problem occurs.. In order to optimize you'll go with putting all the files in one require (furthermore some projects (like doctrine) aggregate all the files into one, and cache this file in order to remove the includes, etc and cache this file..) Anyways, the point is, many people from some PHP company claim to say that PHP is not slower using many require_once and most benchmarks made are not made using real world load, they are simple ab tests and not intensive and extensive stress-tests. Saying that PHP is *not really* slower when using many different files (require_once in many places and subsequent files) is totally false. It is slower and very much slower, but not only with 2 levels of requires but when you start going to 7, 8, 9, etc levels of requires:
Can you give some concrete numbers on this, please? If all we have to go on are ab tests, then that's the only empirical evidence we have. I'd like to see some numbers from these "intensive and extensive stress-tests". -- Matthew Weier O'Phinney mweierophinney@gmail.com http://weierophinney.net/matthew/

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