Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
CES Intelligent Postbit Query Details »
CES Intelligent Postbit Query
Mod Version: 1.0.1, by thincom2000 (Coder) thincom2000 is offline
Developer Last Online: Oct 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.x Rating: (5 votes - 4.80 average) Installs: 26
Released: 28 Jan 2007 Last Update: 03 Feb 2007 Downloads: 105
Supported Code Changes  

CES Intelligent Postbit Query
Version: 1.0.1

This hack is now used as a troubleshooting tool for members with unusually high queries on showthread. You do not need to install this unless your queries peak around 20 or higher.

Note that if after installing this you experience a drop in queries, it means you have a bad plugin installed. Leaving this installed, while this does not hurt your forum at all, does not solve your query problem - it only now hides it.

To disable the tool, you only need to change the line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Post your query success stories in the thread!

For those without success (i.e. it doesn't seem to make a difference), please don't uninstall, but help us determine what is different in your case. PHP version, MySQL version, hacks installed, PHP cache, etc. would all be useful information. Thanks!


*** NEWS ***
This section has become a list of bad plugins. Often these plugins can be optimized by a rewrite using a different hook, and thus not causing this query issue.

Product: Username Management
Hook Location: postbit_factory
Bad Plugin: Add Username history to postbit(legacy)

1/28/2007 - v1.0.0, v1.0.1 released

I actually came across this while trying to reduce queries in my CES Site News mod which uses a customized showthread.php.

Known Issues:
- NONE

- Some users see an amazing improvement, others do not see a difference in query count for some time, while still others don't see any difference at all. It all depends on your server setup and your current vBulletin installation (settings, other mods, etc). This hack is still young (1 day) so we haven't narrowed down what causes these differences in success.

- If you are still experiencing the stolen signatures issue, you need to clear your sig_cache. Do this by going to AdminCP -> Maintenance -> Update Counters -> Empty Signature Cache.

What It Does:
On some installations showthread wastes 1 query per post in showthread.php when creating the postbits. You can tell if this applies to your installation if you approach or exceed 20 queries on a page of only 10 or so posts.

By adding these 4 lines, showthread checks to see if it already has created the appropriate Postbit Factory object instead of doing it all over again. Queries on showthread are thus DRASTICALLY reduced (1 per post), even though the code reveals no direct database references.

This can be a HUGE performance boost.

I hope someone from Jelsoft sees this thread...

Mod Features:
- removes multiple pointless queries

Products to Install: 0
Plugins Included: 0
Files to Upload: 0
Files to Edit: 1
New Templates: 0
Template Edits: 0
Queries Added*: -1

*See "What It Does" for details.

*** Changelog ***
As of Version 1.0.1:
- fixed bug where posts would "steal" signatures from each other
Special thanks to TheFrienzNet for his help ^_^

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements CES Intelligent Attachment Query thincom2000 vBulletin 3.6 Add-ons 21 08 Mar 2008 08:28
Forum Display Enhancements CES Intelligent Announcement Query thincom2000 vBulletin 3.6 Add-ons 17 29 Jan 2007 00:13

  #46  
Old 28 Jan 2007, 23:25
tanyeri24 tanyeri24 is offline
 
Join Date: Feb 2005
Originally Posted by thincom2000 View Post
Does that thread with 15 queries have attachments in it?
Hi, it have no attachements.
Reply With Quote
  #47  
Old 28 Jan 2007, 23:59
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
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:
Fatal error: Call to undefined method stdClass::construct_postbit() in /xxxxxxxxxxxx/showthread.php on line 1070
mmm
__________________
cobraws
Reply With Quote
  #48  
Old 29 Jan 2007, 00:02
TheFrienzNet's Avatar
TheFrienzNet TheFrienzNet is offline
 
Join Date: Jan 2007
As seen from your profile card, you are using vBulletin 3.5.4. This hack only supports 3.6.x.
__________________
Make love not war, condoms are cheaper than guns.
Reply With Quote
  #49  
Old 29 Jan 2007, 00:16
treasureman treasureman is offline
 
Join Date: Feb 2006
Uninstalled, made all my user signature files change to other users, big mess, many complaints!

This should not have been released without testing.
Reply With Quote
  #50  
Old 29 Jan 2007, 00:29
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
You need to clear your signature cache if you are still having this problem.
Reply With Quote
  #51  
Old 29 Jan 2007, 00:46
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
Originally Posted by TheFrienzNet View Post
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.
__________________
cobraws
Reply With Quote
  #52  
Old 29 Jan 2007, 00:46
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
Originally Posted by COBRAws View Post
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead of

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #53  
Old 29 Jan 2007, 00:51
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Real name: Jack
Originally Posted by thincom2000 View Post
That happened to me while during primary testing. On vBulletin 3.6.4 it happens when you have:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead of

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thanks, quick replier but im using 3.6.4 as on my last message. Sorry for not updating my profile info.
__________________
cobraws
Reply With Quote
  #54  
Old 29 Jan 2007, 01:03
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
In that case please post your showthread.php (stripped of license data), and I'll take a look at it.
Reply With Quote
  #55  
Old 29 Jan 2007, 01:20
Kiros72 Kiros72 is offline
 
Join Date: Apr 2006
Real name: Ben Arnett
Is there any reason the queries would appear to be the same (before and after the hack)?
Reply With Quote
  #56  
Old 29 Jan 2007, 01:32
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
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 ?

Last edited by thincom2000; 29 Jan 2007 at 01:39.
Reply With Quote
  #57  
Old 29 Jan 2007, 01:55
Cap'n Steve's Avatar
Cap'n Steve Cap'n Steve is offline
 
Join Date: Feb 2004
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.
Reply With Quote
  #58  
Old 29 Jan 2007, 02:17
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
Originally Posted by Cap'n Steve View Post
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.
Reply With Quote
  #59  
Old 29 Jan 2007, 02:50
Kiros72 Kiros72 is offline
 
Join Date: Apr 2006
Real name: Ben Arnett
Originally Posted by Cap'n Steve View Post
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
Reply With Quote
  #60  
Old 29 Jan 2007, 03:49
G_Man's Avatar
G_Man G_Man is offline
 
Join Date: Feb 2006
Real name: Wade
Originally Posted by Cap'n Steve View Post
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...
__________________
www.afterseppuku.com
Feel free to check it out and tell me what I can do better.
Make Money.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 04:43.

Layout Options | Width: Wide Color: