The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
CES Intelligent Postbit Query Details »» | |||||||||||||||||||||||||
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: PHP Code:
PHP Code:
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 ^_^ Show Your Support
|
Comments |
#62
|
|||
|
|||
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.
|
#63
|
|||
|
|||
oh man it's just too bad it doesn't work for me.
|
#64
|
|||
|
|||
PHP & MySQL versions? PHP cache? Dedicated server?
|
#65
|
||||
|
||||
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!
|
#66
|
|||
|
|||
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.
|
#67
|
||||
|
||||
Uninstalling... This didn't make any change for me.
|
#68
|
|||
|
|||
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. |
#69
|
||||
|
||||
Is there a reason why this is no longer up for download?
|
#70
|
|||
|
|||
coz not necesairy. I installed it but I had before and after same queries and same page generating time.. not useless for me.
|
#71
|
||||
|
||||
I'm sure on smaller boards it is pretty useless but I have a semi-large site so I wanted to test it out.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|