Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Thread view optimizations Details »»
Thread view optimizations
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-28-2003 Last Update: Never Installs: 33
 
No support by the author.

This is a little hack that I did to improve the speed at which threads are
loading in my forums. I am experiencing very high server loads due to the
limited hardware on the server and due to the high post counts in my forums.
This hack has tremendously sped up showthread.php.

In order to view an entire thread, showthread.php makes 3 queries into the
post table. I have managed to divert one of these queries to the thread table,
and have managed to combine the remaining 2 queries into a single query.

The thread table is usually 10%-15% of the post table in terms of count, and
it is about 5% of the post table in terms of its physical size. Using the
thread table for one of the queries will definitely improve things.

This hack requires no template or table changes. It is just 3 simple code
changes made to the source code.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-29-2003, 08:57 PM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks nice will instlal

[high]* Hobbes clicks instlal when he finishes[/high]
Reply With Quote
  #3  
Old 07-29-2003, 09:25 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about some benchmark statistics, by curiousity?

What was the loading time before, and what is it now?
(that is, if you have Teck's microstats installed)
Reply With Quote
  #4  
Old 07-29-2003, 09:31 PM
mx3's Avatar
mx3 mx3 is offline
 
Join Date: Nov 2002
Location: prescott valley, az
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll install this...speed is good.

*mx3 clicks install
Reply With Quote
  #5  
Old 07-29-2003, 09:31 PM
jdmuniverse's Avatar
jdmuniverse jdmuniverse is offline
 
Join Date: Apr 2003
Location: Port St. Lucie FL
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to see some stats too
Reply With Quote
  #6  
Old 07-29-2003, 09:38 PM
mx3's Avatar
mx3 mx3 is offline
 
Join Date: Nov 2002
Location: prescott valley, az
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Loading a bit faster for me
Reply With Quote
  #7  
Old 07-30-2003, 12:09 AM
Pikok Pikok is offline
 
Join Date: Jul 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 11:25 PM Velocd said this in Post #3
How about some benchmark statistics, by curiousity?

What was the loading time before, and what is it now?
(that is, if you have Teck's microstats installed)
Before:
  • Page generated in 1.02129197 seconds (86.35% PHP - 13.65% MySQL) with 28 queries. [GZIP enabled - level 1]
After:
  • Page generated in 1.00562406 seconds (86.31% PHP - 13.69% MySQL) with 27 queries. [GZIP enabled - level 1]
I would think that the savings would be more noticeable for larger threads with numerous replies. The above stats are for a thread with only 2 replies (3 posts total). I think the larger the thread, the more noticeable the increase will be. But, even with a small thread I noticed an increase in speed. It does work! Thanks Zzed!

Perhaps someone with somewhat larger threads could post some stats..
Reply With Quote
  #8  
Old 07-30-2003, 01:06 AM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Page generated in 0.61381495 seconds (81.33% PHP - 18.67% MySQL) with 25 queries.
Page generated in 0.41559005 seconds (80.16% PHP - 19.84% MySQL) with 24 queries.

it loads fast i suppose.

l8er
sonic
Reply With Quote
  #9  
Old 07-30-2003, 02:28 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Always nice to drop a query when installing a mod instead of gain one..

Nice work
Reply With Quote
  #10  
Old 07-30-2003, 05:36 AM
Dolby's Avatar
Dolby Dolby is offline
 
Join Date: Oct 2001
Location: Wisconsin
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So far its working nice. Why didnt vBulletin do this? Is there some sort of draw back?
Reply With Quote
Reply

Thread Tools

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 02:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08218 seconds
  • Memory Usage 2,287KB
  • Queries Executed 25 (?)
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)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete