homepage Welcome to WebmasterWorld Guest from 54.196.197.153
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Does php 'includes' function use more processor?
kapow




msg:1250200
 7:23 pm on Nov 6, 2002 (gmt 0)

Does php 'includes' function use up more processor?

I have a page with: streaming media and a long questinnaire. The contact info part of the questionnaire will be used on many pages and the rest of the questionnaire will be used on several pages. I want to use the php 'includes' function so that I only have one copy of those elements. The site is for a charity (low budget) but the pages may be popular (much server usage). Will my pages use significantly more server capacity if I use the 'includes' function? Or is there no difference?

 

jatar_k




msg:1250201
 7:56 pm on Nov 6, 2002 (gmt 0)

I doubt that you would notice a big difference. I have only noticed problems when using nested includes.

andreasfriedrich




msg:1250202
 11:52 pm on Nov 6, 2002 (gmt 0)

You´ll have another read to load the included file.

But then you probably have a stat call for every directory Apache has to search for .htaccess files unless you disabled them in your server config.

I wouldn´t worry too much about another include.

It´s often a trade off between speed and ease of maintenance. If you want to avoid the disk read and still have your questionaire in a separate file for maintenance think about using an offline tool such as a simple perl or php script that includes the questionaire on upload. I really like offline CMS. Why have the server do the work each and every time a page is requested when some/most of it can be done once offline. I do realise that there are some tasks that need to be done on the server but your include does not.

Andreas

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved