Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2003, 06:01 AM
Hostc
Guest
 
Posts: n/a
Default Forumhome takes 9.88554597 seconds to load??

Page generated in 9.88554597 seconds (1.38% PHP - 98.62% MySQL) with 26 queries.
[Debug Mode OFF] [PHP v4.3.2] [GZIP disabled] [Server Load: 1.02 » 0.53 : 0.26]

{Edited out}

what can I do to make this load faster?
Reply With Quote
  #2  
Old 07-13-2003, 06:54 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow... that's slow.

First of all, you can add "'forumhome_hotattachment" and "10stat" to the $templatesused variable at the top so they are cached - saves you 2 queries.

Also, you may want to try removing the Hot Attachment and/or Stats hacks - try removing one or the other, to see if it helps. It's going to be a hack that's searching a large table.
Reply With Quote
  #3  
Old 07-13-2003, 06:58 AM
Hostc
Guest
 
Posts: n/a
Default

What do you mean "or Stats hacks"

I dont have a stats hack on forumhome?
Reply With Quote
  #4  
Old 07-13-2003, 07:34 AM
Hostc
Guest
 
Posts: n/a
Default

Page generated in 0.33039796 seconds (47.16% PHP - 52.84% MySQL) with 23 queries.
[Debug Mode OFF] [PHP v4.3.2] [GZIP disabled] [Server Load: 0.09 ? 0.08 : 0.12]

After I removed the hottest attachment hack :laugh:



Code:
Query: SELECT template FROM template WHERE title='options'
Time before: 0.040796041488647
Time after:  0.046677947044373

--------------------------------------------------------------------------------

Query: SELECT sessionhash,userid,host,useragent,styleid FROM session WHERE lastactivity>1058084624 AND sessionhash='b6bae515013d520b1bb5161381f6eab1' AND (host='12.225.249.167' OR (althash='' AND althash<>'')) AND useragent='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;'
Time before: 0.052404046058655
Time after:  0.057258009910583

--------------------------------------------------------------------------------

Query: SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='157'
Time before: 0.057469010353088
Time after:  0.064910054206848

--------------------------------------------------------------------------------

Query: INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,althash,location,styleid) VALUES ('f145afe442b7f2a4e981cd225392547c','157','12.225.249.167','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;','1058085524','','/restricted/index.php?&showqueries=1',1)
Time before: 0.078992009162903
Time after:  0.082734942436218

--------------------------------------------------------------------------------

Query: SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='1'
Time before: 0.083199024200439
Time after:  0.085405945777893

--------------------------------------------------------------------------------

Query: SELECT template,title
                          FROM template
                          WHERE (title IN ('colforumtableheader','colforumtablefooter','colforumbit','forumhome_birthdaybit','error_nopermission','forumhome_pmloggedin','forumhome_welcometext','forumhome_logoutcode','forumhome_newposts','forumhome_todayposts','forumhome_logincode','forumhome_loggedinuser','forumhome_loggedinusers','forumhome_lastpostby','forumhome_moderator','forumhome_forumbit_level1_nopost','forumhome_forumbit_level1_post','forumhome_forumbit_level2_nopost','forumhome_forumbit_level2_post','forumhome','forumhome_unregmessage','gobutton','timezone','username_loggedout','username_loggedin','phpinclude','headinclude','header','footer','forumjumpbit','forumjump','nav_linkoff','nav_linkon','navbar','nav_joiner','pagenav','pagenav_curpage','pagenav_firstlink','pagenav_lastlink','pagenav_nextlink','pagenav_pagelink','pagenav_prevlink')
                            AND (templatesetid=-1 OR templatesetid=10))
                          OR (title = 'maxloggedin')
                          OR (title = 'birthdays')
                          ORDER BY templatesetid
Time before: 0.085641026496887
Time after:  0.14707696437836

--------------------------------------------------------------------------------

Query: SELECT * FROM usergroup WHERE usergroupid=6
Time before: 0.15890395641327
Time after:  0.16202998161316

--------------------------------------------------------------------------------

Query: SHOW TABLE STATUS
Time before: 0.16271901130676
Time after:  0.17820799350739

--------------------------------------------------------------------------------

Query: SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='157'
Time before: 0.18027603626251
Time after:  0.18594300746918

--------------------------------------------------------------------------------

Query: 
        SELECT privatemessageid, messageread, dateline, folderid
        FROM privatemessage
        WHERE userid = 157 
Time before: 0.18610298633575
Time after:  0.18868398666382

--------------------------------------------------------------------------------

Query: SELECT userid,username,posts FROM user ORDER BY posts DESC LIMIT 10
Time before: 0.19193005561829
Time after:  0.19978296756744

--------------------------------------------------------------------------------

Query: SELECT userid,posts,username,joindate FROM user ORDER BY joindate DESC LIMIT 10
Time before: 0.20021605491638
Time after:  0.20625805854797

--------------------------------------------------------------------------------

Query: SELECT title,threadid,postusername,lastpost,lastposter,views FROM thread ORDER BY lastpost DESC LIMIT 10
Time before: 0.20650804042816
Time after:  0.21807396411896

--------------------------------------------------------------------------------

Query: SELECT title,threadid,views FROM thread ORDER BY views DESC LIMIT 1
Time before: 0.21840500831604
Time after:  0.22928094863892

--------------------------------------------------------------------------------

Query: SELECT title,threadid,votenum FROM thread ORDER BY votenum DESC LIMIT 1
Time before: 0.22944295406342
Time after:  0.23878300189972

--------------------------------------------------------------------------------

Query: SELECT template FROM template WHERE title='10stat' AND (templatesetid=-1 OR templatesetid=10) ORDER BY templatesetid DESC LIMIT 1
Time before: 0.23892199993134
Time after:  0.24098205566406

--------------------------------------------------------------------------------

Query: SELECT template FROM template WHERE title='10stat' AND (templatesetid=-1 OR templatesetid=10) ORDER BY templatesetid DESC LIMIT 1
Time before: 0.24120497703552
Time after:  0.24231505393982

--------------------------------------------------------------------------------

Query: SELECT userid, username FROM user ORDER BY joindate DESC LIMIT 1
Time before: 0.24245095252991
Time after:  0.24784004688263

--------------------------------------------------------------------------------

Query: SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder
Time before: 0.24835503101349
Time after:  0.25652503967285

--------------------------------------------------------------------------------

Query: SELECT forumid,canview,canpostnew FROM forumpermission WHERE usergroupid='6'
Time before: 0.26244699954987
Time after:  0.26509296894073

--------------------------------------------------------------------------------

Query: SELECT user.userid,user.username,moderator.forumid
                                  FROM moderator
                                  LEFT JOIN user
                                    ON (moderator.userid=user.userid)
                                  ORDER BY user.username
Time before: 0.26525700092316
Time after:  0.26839196681976

--------------------------------------------------------------------------------

Query: SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>1058084624
Time before: 0.26860499382019
Time after:  0.27046096324921

--------------------------------------------------------------------------------

Query: SELECT COUNT(*) AS sessions FROM session WHERE userid>0 AND lastactivity>1058084624
Time before: 0.27054798603058
Time after:  0.27136194705963

--------------------------------------------------------------------------------

Query: SELECT DISTINCT session.userid,username,invisible,usergroupid
                              FROM session
                              LEFT JOIN user ON (user.userid=session.userid)
                              WHERE session.userid>0 AND session.lastactivity>1058084624
                              ORDER BY invisible ASC, username ASC
Time before: 0.27145004272461
Time after:  0.27346396446228

--------------------------------------------------------------------------------

Query: 
			SELECT findword, replaceword, replacementsetid
			FROM replacement
			WHERE replacementsetid IN(-1, '10')
			ORDER BY replacementsetid, replacementid DESC
		
Time before: 0.32838904857635
Time after:  0.33497297763824

--------------------------------------------------------------------------------


Page generated in 0.3204300403595 seconds with 25 queries,
spending 0.19188046455383 doing MySQL queries and 0.12854957580566 doing PHP things.
Query: DELETE FROM session WHERE sessionhash='' Time before: 0.35468697547913 Time after: 0.35836505889893 
--------------------------------------------------------------------------------
Query: UPDATE user SET lastactivity=1058085524,inforum='0' WHERE userid='157' Time before: 0.35857403278351 Time after: 0.36301898956299 
--------------------------------------------------------------------------------
Reply With Quote
  #5  
Old 07-13-2003, 10:15 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's this query for:

SELECT template FROM template WHERE title='10stat'

I assume you have a top 10 stats hack running somewhere. If not, remove that query from your PHP file - the template is called twice for whatever reason, so you may have 2 identical code that needs to be removed.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:38 AM.


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.05584 seconds
  • Memory Usage 2,217KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (2)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete