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 |
#12
|
|||
|
|||
I've tried it on a page of default number of posts (40) - which generated 95 queries before and 95 queries afterwards.
So seems to have no effect. By the way what is this line used for: $lastfetchtype = ($lastfetchtype != $fetchtype) ? $fetchtype : $lastfetchtype; You don't seem to make any reference to $lastfetchtype? |
#13
|
|||
|
|||
$lastfetchtype is a new string this adds to track what the last generated postbit was (i.e. a post, PM, etc.)
PHP Code:
If $lastfetchtype equals this $fetchtype, $lastcheck equals true, otherwise $lastcheck equals false. Now that we know what $lastfetchtype is, we can bother changing it. If $lastfetchtype is not the same as this $fetchtype, update it, otherwise leave it alone. There should be no need to reference $lastfetchtype. Are you using Linear or Hybrid / Threaded Modes on your forum? EDIT: Here's some screenshots to show this actually did something for me. I'm really clueless as to why it wouldn't work for others. I'll restore my backup showthread and check it out. EDIT: I restored my backup and tried it again. No problems. Note that the line PHP Code:
|
#14
|
|||
|
|||
Quote:
EDIT: https://vborg.vbsupport.ru/showthread.php?t=82900 |
#15
|
||||
|
||||
wow!
I had a thread with 101 posts, after doing this changes I had 136 queries, now I just have 35! Good work mate. But, is there any problems doing these edits? |
#16
|
|||
|
|||
Shouldn't be any problems. Unless you have a page with different postbits:
like it shows PMs, and posts, and post-legacies on the same page, but the $lastfetchtype check should eliminate those problems. Glad to hear about that success that's an awesome reduction. Unless someone has issues where it actually messes up functionality, I'm hoping for a MOTM XD, or at least Jelsoft putting it in 3.7.x. |
#17
|
||||
|
||||
With 50 posts per page, this is going to make a huge difference! Thanks very much! Think I will make sure all my files are all current version before I proceed through!
|
#18
|
||||
|
||||
Wow, thanks!
*EDIT* WOW! MY forum's performance is 10x times faster! I mean wow! This is just great! |
#19
|
|||
|
|||
This is probably a stupid question, but how would you go about finding out how many queries it used, what the server load is, etc?
|
#20
|
|||
|
|||
See this post: https://vborg.vbsupport.ru/showpost....8&postcount=13
|
#21
|
|||
|
|||
Thanks - trying it out now
Edit: I'm getting the same bug as well - signatures messing up. I'm not exactly sure why but it seems that there's no difference. 10 queries per page with or without this hack (10 posts per page as well) - or at least that's what I'm getting from the Microstats. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|