Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-16-2009, 06:59 PM   #1
Bronze Member
 
undoIT's Avatar
 
Join Date: Jul 2007
Posts: 29
Default PHP IF Evaluation & Server Overhead

How much server overhead there is when PHP if statements are evaluated, i.e. memory consumption and CPU usage? I've searched around and didn't find anything that definitively answered this question.

For example, if I have a WordPress blog and use a lot of if statements for each post summary on the home page, is this going to require a lot more server resources if the home page starts getting high traffic? And on pages where many posts are listed (i.e. category pages) , it seems like this could become an issue.

Or, is this something I shouldn't even be worrying about?
__________________
Hostgator Coupon - Cheap and green web hosting
Themebot - Free HTML Templates
Internet Explorer 6 must die!
undoIT is offline   Reply With Quote


Old 09-03-2009, 05:23 AM   #2
Gold Member
 
conor's Avatar
 
Join Date: Oct 2008
Location: Ireland
Posts: 349
Default

I can't give you a definite answer but I know a company that hosted 200 low traffic websites on 6GB RAM.

They separated of the high volume sites like ones with 5,000+ hits a day would have their own machine with 1GB RAM.
__________________
Conor
conor is offline   Reply With Quote
Old 09-07-2009, 09:25 AM   #3
Super Noob
 
zkiller's Avatar
 
Join Date: Aug 2004
Location: position:relative
Posts: 1,640
Send a message via AIM to zkiller Send a message via Yahoo to zkiller
Default

There really isn't a definitive answer to your question. It really depends on the complexity of the code in it's entirety, but your basic if statement is hardly worth mentioning.
__________________
Stefan, the Post Master

Track Devil - May the boost be with you!
zkiller is offline   Reply With Quote
Reply

Tags
php, servers, website optimization

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

BB 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 01:06 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.