vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Code Optimisation - Anyone got anything that can optimise your vB files? (https://vborg.vbsupport.ru/showthread.php?t=45293)

wajones 11-03-2002 07:08 PM

Quote:

Originally posted by Erwin
For example, with vBPortal, the templates are not added to the $templateused by default - and they have many custom templates - imagine the waste in querying the database when they could all be cached. (Actually, the vBPortal code tries to include them, but it is written wrongly, and are not included).
How about telling me what I'm doing wrong and how to do it right so I can fix it. I'm presently adding them before it calls global.php or Email me at waj@adelphia.net

N9ne 11-03-2002 07:22 PM

Quote:

Originally posted by NTLDR
Only if you have applied it wrong, I've checked mine and I don't have 7 queries for it.
What code should I check? IIRC the hack only modifies a few files: sessions.php functions.php member.php

Which file could the problem be occuring from?

NTLDR 11-03-2002 07:25 PM

I'd have said if you made a mistake it would have been in sessions.php

N9ne 11-03-2002 07:28 PM

Hmm, this is weird though, showthread only has 27 queries for me, yet when viewing what the queries are, there's such a long list of those :confused:

N9ne 11-03-2002 07:31 PM

...Just checked the code in sessions.php and it's fine, and I still get only 27 queries on showthread...weird.

NTLDR 11-03-2002 07:35 PM

Do all the queries listed add up to 27 on showqueries? I've got 26 on my showthread.

Scott MacVicar 11-03-2002 08:24 PM

if your talking about those ones to update lastactive on the user, they are shutdown queries which run when the script is ending execution for things like setting lastactive time about one in 100 views it will update all the sessions that have ended because users have left in the cookietimeout.

look at the bottom of functions.php

Dean C 11-04-2002 05:38 PM

PHP Code:

$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages,
                                SUM(IF(dateline>
$bbuserinfo[lastvisit] AND folderid=0,1,0)) AS newpm,
                                SUM(IF(messageread=0 AND folderid=0,1,0)) AS unreadpm
                                FROM privatemessage WHERE userid=
$bbuserinfo[userid] $ignoreusers");

  
$newpm['messages']=$allpm['newpm'];
  
$unreadpm['messages']=$allpm['unreadpm']; 

That new PM code doesn't work for me :(

My new pm's and unread pm's dont show up and the total count for my number of PM's is wrong :(

- miSt

Xenon 11-04-2002 06:03 PM

Mist look here, perhaps this could help ya:
https://vborg.vbsupport.ru/showthrea...hlight=Queries

Dean C 11-04-2002 06:34 PM

I'll give it a try Xenon :)

Thanks

- miSt


All times are GMT. The time now is 09:22 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.01277 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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