Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Raditha Dissanayake
Hi, On a busy site (where the milliseconds start to matter) the chances are that the operating system has your include files cached so the load time is probably not a factor. If you install some of the php token caching systems (zend and others) the speed is even better. Gentlemen I do believe

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Robert Cummings
On Tue, 2004-03-16 at 05:11, Raditha Dissanayake wrote: As to using header and footer includes I found that system really frustrating trying to follow the html. What I have switched to is templates where the site layout is a template and each php page generates the content and passes it

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Raditha Dissanayake
Robert Cummings wrote: On Tue, 2004-03-16 at 05:11, Raditha Dissanayake wrote: As to using header and footer includes I found that system really frustrating trying to follow the html. What I have switched to is templates where the site layout is a template and each php page generates the

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Rasmus Lerdorf
If you are that concerned about it, pear install apc. Your include files will be cached in memory and the only cost per include file is a single stat() system call and looking up the opcode cache in shared memory. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Chris W. Parker
Rob Paxon mailto:[EMAIL PROTECTED] on Monday, March 15, 2004 9:24 PM said: Bear with me while I dish out some details. My question concerns the efficiency of using multiple file includes versus storing segments of data in one include as arrays or functions. have you considered the size

RE: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Jason Sheets
Rob Paxon mailto:[EMAIL PROTECTED] on Monday, March 15, 2004 9:24 PM said: Bear with me while I dish out some details. My question concerns the efficiency of using multiple file includes versus storing segments of data in one include as arrays or functions. have you considered the size

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Rob Paxon
Jason Sheets wrote: Sometimes having less included files with more content is more efficient than having a lot of small files [...] I'd think in my case, this is true. Generally, nothing is in these main include files that aren't needed by every page. I'd suggest profiling your code, use the

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Raditha Dissanayake
It is my understanding, as disk reads are so slow, that it is not a good idea to include multiple files. I always knew this, but I never really thought about it. Rob, you will find people who religiously avoid includes have pages that include dozens and dozens of images there by negating the

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Rob Paxon
Thanks for the reply. In my case there aren't many external files associated with the script. 1 css file per site and no images except on a few very specific pages. Adding images does not negate the shaved microseconds. I see what you mean, but it doesn't literally negate the saved load.

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Rob Paxon
I have used templating for specific projects in the past (and never really liked it), but for this group of sites I handle both ends, so it loses a lot of its worth. The factor of a caching system like Zend is something I have overlooked. Currently, I wouldn't assume my virtual host uses it,