Re[2]: [PHP] PHP Website Architecture
| From: | Richard Davey | Date: | Fri, 07 May 2004 16:00:46 +0000 |
| Subject: | Re[2]: [PHP] PHP Website Architecture | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185638@lists.php.net to get a copy of this message | ||
Hello Ryan,
Friday, May 7, 2004, 4:51:45 PM, you wrote:
RA> Nearly all programs can be written in *one* very large .php file but just
RA> thinking of going back in to make changes 3 months down the road would be a
RA> nightmare.
I was just looking at this the other day - I had a local site running
here and profiling the index page took around 800ms with 30 include
files. Out of interest I dumped a load of those files into one and
re-profiled it (11 includes rather than 300) and the load time dropped
dramatically (300ms). I know there are other factors at play here
(Windows vs. Unix, cached vs. needing to seek across the hard drive
every time), but the difference still surprised me. Of course I could
never cope with all of those files "as one", but I will definitely
keep them split up locally and combine into one when published live.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html