vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Template modifications - server intensive? (https://vborg.vbsupport.ru/showthread.php?t=222996)

DeanLag 09-12-2009 01:24 AM

Template modifications - server intensive?
 
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

Code:

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
Quote:

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
PHP Code:

define('DISABLE_HOOKS'true); 

Does your CPU still run high?


All times are GMT. The time now is 07:39 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01207 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete