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

Reply
 
Thread Tools
Optimize forumhome, the filburt1 Way Details »»
Optimize forumhome, the filburt1 Way
Version: 1.00, by filburt1 filburt1 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-26-2003 Last Update: Never Installs: 20
 
No support by the author.

This hack greatly reduces the number of queries on forumhome. On my test board, before:
Code:
Page generated in 1.81393003464 seconds with 30 queries,
spending 1.17402160168 doing MySQL queries and 0.639908432961 doing PHP things.
After:
Code:
Page generated in 1.37496697903 seconds with 20 queries,
spending 1.00117218494 doing MySQL queries and 0.373794794083 doing PHP things.
The very, very clever hacker can combine elements of this hack and Xenon's to reduce forumhome queries even more; specifically, his optimizations for a moderator cache and Who's Online.

There's also an added benefit: since the number of rows in all tables are cached and not just users, posts, and threads, you can use $counts[tablename] anywhere in forumhome and have the number of rows in tablename show up (for example: Mail Messages: $counts[mailmessage]).

Note that because some PM processing is now given to PHP instead of MySQL, the page load time might increase. It will depend on how many PMs the current user has, among other things. However, the PM handling eliminates two queries.

Show Your Support

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

Comments
  #42  
Old 06-27-2003, 09:20 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe someone can help me with a little step by step in getting this hack and the one by Xenon to work perfectly together? I attempted to merge the two together myself and it hasn't worked with multiple attempts.

Has anyone done this properly and can say specifically what to leave out of one hack or another to get them to play happily in the playground together?

Note: I have Xenon's hack installed already, and want the best parts of this hack to work nicely with it! Thanks for any help you can provide. This is the last thing I have to get past to go live with v3 of my site.
Reply With Quote
  #43  
Old 07-07-2003, 02:49 AM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone out there anymore?
Reply With Quote
  #44  
Old 07-14-2003, 10:31 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone give a step by step on how to accomplish this?
Reply With Quote
  #45  
Old 07-30-2003, 02:26 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

Sweet deal.. Brought my queries down from 23/24 on forumhome to 19/20, and everything appears to still be running ok. The load appears to slightly depend more on MySQL than PHP than it did previously (before: 80% PHP, 20% MySQL - after: 75% PHP, 25% MySQL), but that's nothing major.

Nice optimizing there filburt..
Reply With Quote
  #46  
Old 07-30-2003, 12:32 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd still like to get this to cooperate nicely with Xenon's hack, can anyone help with my post above?
Reply With Quote
  #47  
Old 08-05-2003, 03:15 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help with a small step by step in making these 2 work perfectly together?
Reply With Quote
  #48  
Old 08-08-2003, 10:00 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
old
Page generated in 0.13271797 seconds (85.62% PHP - 14.38% MySQL) with 37 queries.
[Debug Mode OFF] [PHP v4.3.2] [GZIP enabled - level 1] [Server Load: 0.54 ? 0.61 : 0.92]
Quote:
New
Page generated in 0.1300003 seconds (72.34% PHP - 27.66% MySQL) with 32 queries.
[Debug Mode OFF] [PHP v4.3.2] [GZIP enabled - level 1] [Server Load: 0.77 ? 0.63 : 0.90]
Basicly 37 down to 32 queries the forums gone blazing fast
on a really hacked forum ie 80+ hacks

erm wondering now can i still add xenons hack

but am wondering why server load has increased :s
and its going faster
Reply With Quote
  #49  
Old 08-09-2003, 07:08 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
08-05-03 at 05:15 PM Alien said this in Post #46
Can anyone help with a small step by step in making these 2 work perfectly together?

this file should work with filberts Optimisation
Reply With Quote
  #50  
Old 08-09-2003, 05:30 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless you edited that file, I already have Xenon's hack installed as it was out first. I want to add this one for the additional 1-2 queries more that I can save but need a step by step on how to do this and I'm surprised noone has followed up on this.

It's not a simple matter (as I was hoping) of just modifying stuff in the usual way (and just not replacing one thing that both modify etc.). It seems more complicated than that when i started finding/replacing stuff so I quit it.

Can anyone help with a simple STEP-BY-STEP on this?
Reply With Quote
  #51  
Old 08-09-2003, 05:39 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm sorry i did in reverse to u i added Filberts hack first then i added Xenons hack afterwards like that
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 12:58 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.14691 seconds
  • Memory Usage 2,305KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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