vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - CES Intelligent Postbit Query (https://vborg.vbsupport.ru/showthread.php?t=137711)

tanyeri24 01-28-2007 08:51 PM

Quote:

Originally Posted by TheFrienzNet (Post 1169274)
Do you have any other page compressor/cache accelerator or whatsoever?

None I known.

Quote:

Originally Posted by thincom2000 (Post 1169275)
What's the query count?

A thread with 10 posts:
Page generated in 0,58209 seconds with 15 queries [Server Loads: 2.04 2.76 : 3.19]

TheFrienzNet 01-28-2007 09:05 PM

Err... 15 queries. That's pretty good.

tanyeri24 01-28-2007 09:12 PM

Quote:

Originally Posted by TheFrienzNet (Post 1169289)
Err... 15 queries. That's pretty good.

But I had it with original showthread.php too :D

thincom2000 01-28-2007 09:21 PM

Does that thread with 15 queries have attachments in it?

Get Shorty 01-28-2007 09:24 PM

Installed with no problems, but I don't notice a difference in the number of queries on each page.

tanyeri24 01-28-2007 09:25 PM

Quote:

Originally Posted by thincom2000 (Post 1169297)
Does that thread with 15 queries have attachments in it?

Hi, it have no attachements. :rolleyes:

COBRAws 01-28-2007 09:59 PM

I was having the Steal sigs bug, now I updated with the new code replacements (replaced just the first instances and the two).

Anything I do, I get the following error msg:
Quote:

Fatal error: Call to undefined method stdClass::construct_postbit() in /xxxxxxxxxxxx/showthread.php on line 1070
mmm :(

TheFrienzNet 01-28-2007 10:02 PM

As seen from your profile card, you are using vBulletin 3.5.4. This hack only supports 3.6.x.

treasureman 01-28-2007 10:16 PM

Uninstalled, made all my user signature files change to other users, big mess, many complaints!

This should not have been released without testing.

thincom2000 01-28-2007 10:29 PM

You need to clear your signature cache if you are still having this problem.

COBRAws 01-28-2007 10:46 PM

Quote:

Originally Posted by TheFrienzNet (Post 1169324)
As seen from your profile card, you are using vBulletin 3.5.4. This hack only supports 3.6.x.

Im using 3.6.4 my profile was not updated.

thincom2000 01-28-2007 10:46 PM

Quote:

Originally Posted by COBRAws (Post 1169322)
I was having the Steal sigs bug, now I updated with the new code replacements (replaced just the first instances and the two).

Anything I do, I get the following error msg:


mmm :(

That happened to me while during primary testing. On vBulletin 3.6.4 it happens when you have:
PHP Code:

$lastfetchtype = ($lastfetchtype != $fetchtype) ? $fetchtype $lastfetchtype;
$lastcheck = ($lastfetchtype == $fetchtype) ? true false

instead of
PHP Code:

$lastcheck = ($lastfetchtype == $fetchtype) ? true false;
$lastfetchtype = ($lastfetchtype != $fetchtype) ? $fetchtype $lastfetchtype


COBRAws 01-28-2007 10:51 PM

Quote:

Originally Posted by thincom2000 (Post 1169362)
That happened to me while during primary testing. On vBulletin 3.6.4 it happens when you have:
PHP Code:

$lastfetchtype = ($lastfetchtype != $fetchtype) ? $fetchtype $lastfetchtype;
$lastcheck = ($lastfetchtype == $fetchtype) ? true false

instead of
PHP Code:

$lastcheck = ($lastfetchtype == $fetchtype) ? true false;
$lastfetchtype = ($lastfetchtype != $fetchtype) ? $fetchtype $lastfetchtype


Thanks, quick replier :D but im using 3.6.4 as on my last message. Sorry for not updating my profile info.

thincom2000 01-28-2007 11:03 PM

In that case please post your showthread.php (stripped of license data), and I'll take a look at it.

Kiros72 01-28-2007 11:20 PM

Is there any reason the queries would appear to be the same (before and after the hack)?

thincom2000 01-28-2007 11:32 PM

For each post, -1 query. For each signature +1 query.

It would appear to be the same if the number of different signatures and posts are the same. In its current form, this would only be beneficial if the same people keep posting in a thread.

EDIT: That's completely untrue. I just looked at the code again, and at my site, and this does not add queries for signatures.

There is no reason I can think of why you should not be getting QUERIES SAVED = NUMBER OF POSTS ON PAGE - 1.

Do you have any hacks that run on postbit hooks ?

Cap'n Steve 01-28-2007 11:55 PM

Maybe I'm missing what exactly this hack does, but I know that default vBulletin doesn't do a query for every post. If you have more than 20 queries or so, then something is very wrong.

Get Shorty 01-29-2007 12:17 AM

Quote:

Originally Posted by Cap'n Steve (Post 1169400)
Maybe I'm missing what exactly this hack does, but I know that default vBulletin doesn't do a query for every post. If you have more than 20 queries or so, then something is very wrong.

Yeah, like I mentioned, I didn't see any change in query usage.

Kiros72 01-29-2007 12:50 AM

Quote:

Originally Posted by Cap'n Steve (Post 1169400)
Maybe I'm missing what exactly this hack does, but I know that default vBulletin doesn't do a query for every post. If you have more than 20 queries or so, then something is very wrong.

No, I don't have any hacks that would modify the postbits - not that I'm aware of :confused:

G_Man 01-29-2007 01:49 AM

Quote:

Originally Posted by Cap'n Steve (Post 1169400)
Maybe I'm missing what exactly this hack does, but I know that default vBulletin doesn't do a query for every post. If you have more than 20 queries or so, then something is very wrong.


I just uninstalled since my queries were exactly the same as before making the edits. It sure seems to be helping on some forums though.

Hopefully something can be found to establish this benefit. I have a few mods boosting my queries to around 27-35 or so...

thincom2000 01-29-2007 02:02 AM

Quote:

Originally Posted by Cap'n Steve (Post 1169400)
Maybe I'm missing what exactly this hack does, but I know that default vBulletin doesn't do a query for every post. If you have more than 20 queries or so, then something is very wrong.

According to showthread.php you are correct in saying that vBulletin doesn't do a query for every post. However, the function $postbit_factory->fetch_type($fetchtype) apparently calls a query. Where? I'm not sure. And why do certain users experience this madness and others don't? That I also don't know. All I know is that by controlling the number of times fetch_type() is called, those of us with query issues on showthread (20 - 25 queries) can now relax with 12 - 15 queries.

da420 01-29-2007 06:40 AM

oh man it's just too bad it doesn't work for me.

thincom2000 01-29-2007 11:18 AM

PHP & MySQL versions? PHP cache? Dedicated server?

TheFrienzNet 01-29-2007 11:48 PM

Oh wow! Damn! I mean WOW! I saved over 200 memory! The forum speed is now 10x times faster! I mean wow... this has to be the greatest tweaking I've ever saw! I hope Jelsoft includes this!

fastforward 01-30-2007 12:07 AM

As far as I can tell, the only way this hack will reduce the number of queries is if you have hacks that use the postbit hooks. If you do have hacks that use those hooks, then this hack may do more harm than good as it will bypass the calls to those hooks.

Get Shorty 01-30-2007 02:45 AM

Uninstalling... This didn't make any change for me.

thincom2000 01-30-2007 03:46 AM

To argue with all those who say there are no queries in the postbits, there are actually a number of queries vBulletin can possibly make during each cycle. I have been investigating this extensively, following function call to function call.

In class_postbit.php, the function call to cache_permissions() - cache_permissions is defined in functions.php and can execute a query under certain conditions. Tested, and this is not our extra query.

In class_bbcode.php, queries can be made to the table bbcode and smilie if $vbulletin->bbcodecache or $vbulletin->smiliecache are empty. Tested, and this is not our extra query.

I will be adding to this over time as I investigate further.

EDIT: I found the cause of the queries.

A little product called: Username Management
Has a plugin included for: postbit_factory
Plugin is called: Add Username history to postbit(legacy)

I don't know why the coder used a separate query for this when only a $hook_query_fields addition was necessary.

AzzidReign 02-03-2007 08:18 PM

Is there a reason why this is no longer up for download?

tanyeri24 02-03-2007 08:23 PM

coz not necesairy. I installed it but I had before and after same queries and same page generating time.. not useless for me.

AzzidReign 02-03-2007 08:27 PM

I'm sure on smaller boards it is pretty useless but I have a semi-large site so I wanted to test it out.

da420 02-03-2007 08:33 PM

Please read the original post by the author of this hack.
It will explain why it was taken out...

thincom2000 02-03-2007 09:14 PM

Yes, but to clarify: some users have reported that they did not have that product (Username Management) installed and still had high query counts.

There are a number of plugins that cause this, although in one case I have been unable to determine the origin of the 1 query per post.

If you have ibProArcade installed, there is a plugin which allows you to show crowns, etc. in the Postbit. This could potentially add 2 queries per post, so disable it.

If anyone has ibProArcade installed and can tell me the name of the plugin, I will include it in the first post.

Also, if you had neither of these installed and your query count on showthread is unusually high (around 20), post here, and we can work together to identify all the bad plugins (and request that the coders use $hook_query_joins in hook showthread_query instead).

I will re-upload the file for members to download as a troubleshooter in this respect, not as a hack.

Skyline_GT 02-03-2007 09:26 PM

I am looking to try this. How can we check how many Query it is using?

da420 02-03-2007 09:31 PM

Enable Debug mode.

JohnBee 02-06-2007 02:22 PM

Installed and it looks like its working from 20 queries down to 14 !!!
I will keep and eye on it for awhile to make certain this is for real :)

fastforward 02-06-2007 02:43 PM

Quote:

Originally Posted by JohnBee (Post 1175994)
Installed and it looks like its working from 20 queries down to 14 !!!
I will keep and eye on it for awhile to make certain this is for real :)

You might want to read this earlier post again. You might be breaking any plugins you have installed that use the pobit hooks.

thincom2000 02-07-2007 01:03 AM

In case you haven't read the description to this hack recently, or my extensive post on the purpose of the hack: the point IS to break those plugins. The fact that your queries dropped means that you have plugins installed that aren't properly optimized and should either be rewritten (if you have experience coding) or disabled.

JohnBee 02-07-2007 06:30 PM

Quote:

Originally Posted by thincom2000 (Post 1176480)
In case you haven't read the description to this hack recently, or my extensive post on the purpose of the hack: the point IS to break those plugins. The fact that your queries dropped means that you have plugins installed that aren't properly optimized and should either be rewritten (if you have experience coding) or disabled.

No negative side effects to date. I have been working on the forum since yesterday testing things out.

Thanks for a great hack!

oldford 02-13-2007 08:34 PM

11 - 0 = 11 ... So no change for me. This is on a thread viewing 40 posts.

I appreciate your efforts and I'm glad it seems to help out those with more queries. I just wanted to post that it didn't affect mine. Thanks!

thincom2000 02-14-2007 11:39 AM

10 queries is the lowest I've been able to get queries on a showthread page. This is with NO attachments and NO polls. An attachment(s) will add 1 query to the entire thread, and a poll will add 2.

So if you have 10-13 queries, as a rule you probably don't need any optimization.

For me, so far I've been able to join all queries that do anything on a showthread page except the 2 additional poll queries. They seem to be a little more complicated.


All times are GMT. The time now is 05:57 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.01530 seconds
  • Memory Usage 1,838KB
  • 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
  • (4)bbcode_php_printable
  • (14)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
  • (40)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