vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Optimizing Forumhome (https://vborg.vbsupport.ru/showthread.php?t=46848)

Xenon 12-19-2002 10:00 PM

Optimizing Forumhome
 
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....

NTLDR 12-20-2002 09:37 PM

Thanks for releasing Xenon, I'm going to be sure to test this one :D

Xenon 12-20-2002 09:38 PM

:)
i hope i'll get good results by you NTLDR :)

Dean C 12-20-2002 09:44 PM

Yea i'll test this one out - sounds awesome :P

Chris M 12-20-2002 09:57 PM

Sounds good:)

Will install:)

Satan

JulianD 12-20-2002 10:09 PM

I'm going to test it for my new site! Thanks Xenon!

Xenon 12-20-2002 10:17 PM

i have to thank everyone who test it to bring back some feedback to me :)

if it works as it should i'll create other hack like that (have some ideas :))

@All: my PM-solution worked wrong (damn) the file is updated with the well known pm-query, you should use this instead :)

Lanigironu 12-20-2002 10:47 PM

This is great!

My queries used to be at 48, and now dropped to 38.

I know this is extremely high, so are there any ways to lower it any more?

Boofo 12-20-2002 11:14 PM

Xenon, I did a re-fresh with 21 queries, it jumped to 23 and on another refresh, it went down to 17. I figure it was the cache kicking it. Its there a way to add this:

Code:

$totalviews=number_format($countthreads['views']);
to the query you have to make one less query if we are using this?

Also, the code for this:

Code:

$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);

// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');

must be a little different in 2.2.9. :)

Xenon 12-20-2002 11:31 PM

Uploaded new version with small bugfix
be sure you also make the table change to have lastupdate in it :)


Boofo: Well, yes it can be changed, if you use the threadtable instead of the forum-table, but the forumtable is faster, and on an unhacked vb229 i've used the optimized version :)

once it's out of the beta i can make it for you or post it here ok?

Quote:

must be a little different in 2.2.9
hmm, no i've compared it with an unhacked vb229 file, maybe your fle is hacked...

Quote:

Xenon, I did a re-fresh with 21 queries, it jumped to 23 and on another refresh, it went down to 17. I figure it was the cache kicking it.
Yes there are 3 extra queries compared to an normal forumhome call when the cache is updated, but at least 3 less to a normal one if read out from the cache.
But the additional queries are very fast from what i know compared to the others :)


All times are GMT. The time now is 11:10 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.01433 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete