Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2007, 10:11 AM
Senior Member
 
Join Date: Mar 2007
Posts: 274
Default make a website fast

I'm new to PHP and trying to make my website as fast as possible.

Is there any real difference in speed between including, say, an 9K file rather than a 60k file?

I'm precalculating database queries and wondering if I should save the results of each query in a separate file or whether they would be ok all in the same file.
Reply With Quote
  #2 (permalink)  
Old 07-03-2007, 10:13 AM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default

Just to add to what krt said there is some overhead when doing includes opposed to having the code already there. Now is the overhead noticable? No not in most people's cases. You'll start to notice it when you're including 50 files on one page.
Reply With Quote
  #3 (permalink)  
Old 07-03-2007, 10:15 AM
Senior Member
 
Join Date: May 2007
Posts: 329
Default

No, the script is not downloading the pages, it is being done on the server and accessing files on the local filesystem is quick enough that the difference in cases like your one will be negligible.

As for what you are trying to do, I would suggest separate files to save processing when parsing through the larger file to get the data needed.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0