PDA

View Full Version : Template modifications - server intensive?


DeanLag
09-12-2009, 01:24 AM
Hello all!

I was just wondering if template conditionals would be CPU intensive?
My hosting company just contacted me and said that my showthread.php is consuming a lot of CPU resources.

Would something like:
< if member id is 1, then background colour = blue,
else background colour = normal.>
Moreover, would something like:
<if threadid = 5 or threadid =10 or threadid = 50, then background colour = red
else
if threadid = 125 or threadid = 234
background colour = yellow
else
background colour = normal.>

Would the above codes be CPU intensive?
I have 4 days to rectify this or they'll terminate my VPS <_<

Thank you in advance :)

Brandon_R
09-12-2009, 02:39 AM
If you are on a VPS and can't handle those kind of calls you really need to change hosts.

DeanLag
09-12-2009, 03:15 AM
Hmm thanks for that, Brandon. Maybe its one of the mods.
The current MODs im using are: Change Posts Owner 1.8.0

Colors For Usergroup In Forum Display 1.0.0

Cyb - ChatBox 2.3 Cyb - ChatBox

Default User Text Formatting 1.0
Easy Pages 1.0.0L C
First Post On All Pages 1.0.0 1.0.0
Gameroom 1.0.1 Multiplayer gameroom
Limit Poll Option Choices 1.0.1
Members who have Registered 3.8.002
Members who have Visited 3.8.002
Multiple Account Detection & Prevention 1.1.3
Nick in Quickreply & Quote selected text 1.0.4
Opserty: Individual Username HTML Markup 1.0
Real ip detection 3.8.001

Sakera's Hide Poll Result 1.2
Separate Sticky and Normal Threads [Forum Based] 1.0.0
Show poll(s) in forumhome 1.0.1
Show Profile Fields In Postbit, Zero Query & Templ
Usergroup Color Bar 2.0.0
Username HTML Markup 2.0

v3 Arcade 1.1.1
v3 Arcade - Who's Online in the Arcade? 2.0.0
vBCode table 0.1.7.1
vBCommerce 1.0.0
vBCommerce Itemtype: Icon 1.2
vBCredits 1.4

vBCredits with v3 Arcade 1.1
vBStatus 3.0
VietOnLine® 3.8.x
Who Has Read a Thread. 3.8.003
Yet Another Award System 3.8 3.8.2

I installed the [tg]Egg Avatar but removed it as it wasnt bring any real functionality to the the forums and prolly server intensive.
Would the Yet Another Award System be the culprit? or the vBcredits items showing on each page?

I've been with LunarPages before but was on a shared hosting environment and they said I was consuming too much CPU resources. So I moved to InMotion hosting with a VPS package, thinking the VPS would be enough to sustain technically any MODs.

So according to Brandon, the template edits are fine..

DeanLag
09-13-2009, 08:13 AM
Bump. Still need help with that =/

James Birkett
09-13-2009, 09:57 AM
Feel free to disable the modifications relating to showthread.php and see if your CPU load lowers.

DeanLag
09-14-2009, 01:17 AM
Aiight, thanks for that James.

Now they're telling me
As to the resource usage, you're still using about 6.8 times the number of CPU cycles per day that you should be to fit on the platform. This appears to be mostly MySQL-driven load, probably due to queries coming from vBulletin.

Any ideas? =/

James Birkett
09-14-2009, 02:38 PM
Some form of script? Hmm..
By default, vBulletin doesn't run very server-intensive scripts.
Disable all your modifications, either manually or by inserting the following code into your config.php right under <?php
define('DISABLE_HOOKS', true);

Does your CPU still run high?