Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP and server resources
Old 03-20-2008, 12:51 AM PHP and server resources
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
Just wondering if someone could educate me about best practices regarding PHP and server resources. Specifically, are there recommended thresholds for:
  • PHP file sizes
  • The number of file includes
  • The number of queries executed per page
  • The types of functions that reduce the server load vs the types that increase it
I realize there aren't necessarily clear cut answers and obviously, the smaller sizes and fewer number of requests are better. I'm just curious if you have any standards you follow and what they are if you do.
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
 
Register now for full access!
Old 03-20-2008, 03:43 AM Re: PHP and server resources
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
What for? If you at least use mysql database your delays on connecting, sending queries and reading results will be much, much greater than those milliseconds you would save optimizing your php code. Of course you can make any code one byte shorter and one cpu tick faster, but is it really necessary to fight for extra milliseconds if your sql query executes 0.5 seconds? In this case you should optimize your tables and your queries instead. And if the problem of saving milliseconds is really actual, if e.g. you are having 1000 hits/second still it should not be optimized by means of php because it is called "highload" and you should use quite other solutions like light-weight frontend webserver serving static files.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to PHP and server resources
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28606 seconds with 12 queries