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)

Kars10 03-21-2003 04:02 PM

First of all this hack works great for me!!
Thanks Xenon.
But i have a problem with my $forum[moderators]. This variable is not working for me anymore.

I have deleted this code:

PHP Code:

$imodcache = array();
$mod = array();
$forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
                                  FROM moderator
                                  LEFT JOIN user
                                    ON (moderator.userid=user.userid)
                                  ORDER BY user.username'
);
while (
$moderator=$DB_site->fetch_array($forummoderators)) {
  
$imodcache["$moderator[forumid]"][] = $moderator;
  
$mod["$moderator[userid]"] = 1;
}
$DB_site->free_result($forummoderators);
unset(
$moderator); 

When i put the moderator-code back in my index.php i have my moderators showing up, but all with a >> , << comma bevor there names (examble: , xxx, xxx).
What can i do to make the moderators work.

Thanks in advance.

Xenon 03-21-2003 04:05 PM

have you run the last step and modified a forum from your acp to initialise the Mod cache?

Kars10 03-21-2003 04:33 PM

Yes i have, and my mods are cached in the DB :)

Xenon 03-21-2003 04:37 PM

then they should also be displayed!

the var is filled, that's why all other mods are added with a , in front to it.

maybe you have an disturbing hack installed which doesn't like mine ^^
i know your complicated index.php :p

Kars10 03-21-2003 04:42 PM

No way buddy...my index works!! ;)
But what could it be that this variable don?t work anymore??
I promise, when i put the orginal mod-code back in the file, it works like a charm (but than i get that wierd comma)... :(

Xenon 03-21-2003 04:56 PM

well i know the hack works, and as it used the variable correct, it should show up :)

so it must be your index.php, and no i don't have time to take a closer look at your file ;)

AlexanderT 03-22-2003 03:46 PM

I don't really know, but most of you guys only speak of reducing queries, but not total page generation time (see here: https://vborg.vbsupport.ru/showthrea...243#post361243)

I installed the hack and got the following timings:

WITHOUT Hack:
Page generated in 0.12671995 seconds (70.49% PHP - 29.51% MySQL) with 30 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 1] [Server Load: 0.33 ? 0.55 : 0.87]


WITH Hack:
Page generated in 0.23996496 seconds (37.26% PHP - 62.74% MySQL) with 26 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 1] [Server Load: 0.33 ? 0.55 : 0.87]


... So yes, queries were reduced by a lot, but total page generation took almost twice as long. So I assume the hack doesn't really do it for me.

Xenon 03-23-2003 04:30 PM

i hope you have run those test a bit more often than just once did ya?

i've tested it several times and the gen time was in average 80% of the old gen time.

of course if you just look on the time once it could happen that the time differences so much.

AlexanderT 03-23-2003 04:41 PM

yup I did... one entire evening testing. Query time was always below non-hack, but final page generation was above. I think the replacement of the pm query routine took most additional time.

Xenon 03-23-2003 05:01 PM

hmm, could i have some stats of you board?
post ammount, thread ammount, total pm ammount(and the ammount of pm's you have had in your account while testing)...

especially the pm ammount would be important, in version1 i know it was slower when there are a lot of pm's of a user that for this user the generation was slower, but for the average users who doesn't have much pm's it was faster.

normally all other queries should be faster than the original ones.


All times are GMT. The time now is 03:13 PM.

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.01487 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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