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

Reply
 
Thread Tools
Optimizing Forumhome Details »»
Optimizing Forumhome
Version: 1.00, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-19-2002 Last Update: Never Installs: 94
 
No support by the author.

Ok, what this Hack does is it reduces the ammount of queries on forumhome by caching the moderatorlist and by optimizing most of the queries used on index.php


I'd really appreciate getting feedback how it reduces serverload on greater boards

On an unhacked vb index.php (pm enabled accesmask disabled) it reduces the ammount of queries from 19 to 15
my experiments have shown, that the queries are faster than the normal ones, too....

Show Your Support

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

Comments
  #42  
Old 12-21-2002, 06:35 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working well so far Xenon

Quote:
With Cache:
Page generated in 0.400 seconds (21.03% PHP - 78.97% MySQL) with 19 queries.

Updating Cache:
Page generated in 0.536 seconds (31.74% PHP - 68.26% MySQL) with 25 queries.
Seems to be loading well all round IMO
Reply With Quote
  #43  
Old 12-21-2002, 06:39 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A little bit off-topic, but its funny to see when your looking at the forumbits from cache_forumhome table before and after a Zlib compression

Before:

<table bgcolor="#0A293E" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr align="center">
<td bgcolor="#1D6AA0"><smallfont> </smallfont></td>
<td bgcolor="#1D6AA0" width="80%" align="left"><smallfont color="#EEEEFF"><b>Forum</b>
</smallfont></td><td bgcolor="#1D6AA0"><smallfont color="#EEEEFF"><b>Posts</b>
</smallfont></td><td bgcolor="#1D6AA0" width="160" nowrap><smallfont color="#EEEEFF">
<b>Last Post</b></smallfont></td>
<td bgcolor="#1D6AA0" width="20%"><smallfont color="#EEEEFF"><b>New Post</b>
</smallfont></td>

Turning into something like this:
After:

sCãGZBçC֣ϤS0~p¼êJ5eµÃy¯£^üËÆ ñѪØGfÃ.oËÉ^,ÿ3ÊÈ
nð±¬ñqÏñ±|ôø¸,^j„<„¬äFÈ3>b!ëg÷|ò ¯¥¦/A¯œ{”Ä›_?–ëæ‘àc¥¶U|¬(d®=Þ
0V40î90VŽ—„I]K¡k)î/–þsh%ÐõÒºŽB×Qhª¿yªïä¦úiHºŽ°?? ?ãì¹@áø%ú:÷„ðâ‘
Í'Â*²–øç'úVµQÞ.Ñw”û½—\êŸ!©ÝÐ}G ý=§ûÎÑÓý¹P©S`‡ƒ‹µµqñôâxÍì× TŠe¤‡F6
Ÿü²k‰æ*˜XoT¶[<QS®Rh' µ]`bMcâžcbMcâL˜ÔÙ/ýZ’ýº[\ ¸9 :ñ¥_:ñ¥ þ
ƾû£ï@êfvoÖZ

:classic:
Reply With Quote
  #44  
Old 12-21-2002, 06:44 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*hehe* ^^ I agree Its a pain in phpMyAdmin as it causes and error if you click on the edit or delete link. However this is a small price to pay IMO if the compression saves a worthwhile amount of space.
Reply With Quote
  #45  
Old 12-21-2002, 06:49 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Aaron: 1 querie fluctuations are normal, whenever you login into your board after the cookietimeout of your last visit

@boofo: well that one can't work with the hack, because you'd combine dynamical content with cached content.....
to get it back on working correctly you'll lose the cacheing features of my hack

@NTDLR: ahh, good to hear

@Aaron: of course, the first version saves the forumbits in plain html into the db, the new one uses a compression function before savein into db
Reply With Quote
  #46  
Old 12-21-2002, 06:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Decisions...decisions...ok, I can forgo that hack for now (at least until I can figure a way around it). How about the extra threadviews problem, "buddy"?
Reply With Quote
  #47  
Old 12-21-2002, 06:59 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Aaron1
I just checked with a simple phpinfo script:

ZLib Support enabled
'zlib:' fopen wrapper enabled
Compiled Version 1.1.3
Linked Version 1.1.3

I seem to have it installed
Thanks
Can you share the script, please?
Reply With Quote
  #48  
Old 12-21-2002, 07:06 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops

Invalid SQL: SELECT COUNT(title) AS starts FROM thread WHERE postusername='d' jam-man' AND open!='10' mysql error: You have an error in your SQL syntax near 'jam-man' AND open!='10'' at line 1

mysql error number: 1064

Date: Saturday 21st of December 2002 09:57:26 PM
Script: http://www.housequake.com/forum/foru...fo&userid=1645
Referer: http://www.housequake.com/

Whats that? Weird?
Reply With Quote
  #49  
Old 12-21-2002, 07:09 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo


Can you share the script, please?
No problem its very simple

Open notepad. Paste this inside:

PHP Code:
<?php
    phpinfo
();
?>
Save as: whateveryoulike.php
Upload & voila!
Reply With Quote
  #50  
Old 12-21-2002, 07:11 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that's almost like the one I am using now. Only mine is phpinfo(32). I guess I will have to look closer at it. Thanks!
Reply With Quote
  #51  
Old 12-21-2002, 07:17 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Boofo: you're welcome, i only wished all coding was that simple

@Xenon: I don't think my problem is related to year hack, because it has something to do with illegal user names; The quote marks seem non allowed? But why do i get a database error for that... But its the first time i get this error.

----

One more thing, is that extra querie i have (yep i never got that marvelous 20 queries back again) due to that Zlib addition?
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 03:16 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.04552 seconds
  • Memory Usage 2,307KB
  • 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_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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_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