Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include() performance

Status
Not open for further replies.

wapoc

Programmer
Jan 29, 2003
14
FR
Hi.

My website is for use by WAP devices. These require very a strict HTML-like language. If there is a problem with the page it will cause an error. Basically, characters like © MUST be converted to © format.

Anyway, there's a bit of PHP code in each script to convert them all for me. This is on pretty much every script and is always the same.

I use "include(scriptname.inc)" for some other purposes and it works well, BUT I wondered with such a frequent requirement for execution of this code, would I lose significant performance by putting it in a single include file and referencing to it?

The site is busy and server resources are tight but it would reduce the filesize of over 100 scripts and make editing the code easier. I appreciate that this might be a question only I can answer, but I'd like to have an idea before I change all those files.

Thanks!

Rob Pridham
wapocalypse.com
 
I don't think it will affect performance at all. Unless your application is very complex, the real bottleneck in performance will be the network.

I generally recommend that programmers use the include() and require() functions. It can make code maintenance a lot easier.

Want the best answers? Ask the best questions: TANSTAAFL!
 
Excellent, that's what I was hoping! Oh, and when I said about © format before, the second one was meant to be written & # 1 6 9 ; in case anyone was wondering!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top