MyBB Community Forums

Full Version: Sticky Affecting Processing Time in Forumdisplay
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Quote:Huh. Very interesting. This plugin of yours looks like an alternative version of MyConversations, where private threads are used in place of private "conversations", leveraging, no doubt, all of the existing functionality of showthread.php rather than, as MyConversations does, pretty much duplicating it.

Welcome to the dark world of trying to exploit the threads module as much as possible, building on top of it as much as possible, 👾

Quote:Does that sound like a reasonable (but more importantly, sufficiently comprehensive) description?

Pretty much.
(2021-02-26, 01:56 AM)Omar G. Wrote: [ -> ]I can seem hooks being useful in the following places:
https://github.com/mybb/mybb/blob/8b22ad....php#L8798

Yes. If there was a hook there, then $pmhandler could simply be immediately replaced with a compatible object of the plugin developer's choosing - whether via control_object or simply the wholesale construction of an extended class.

(2021-02-26, 01:56 AM)Omar G. Wrote: [ -> ]And then use this function in all places that send PM (enhancement might be necessary).

I didn't want to rely on that function being the only one used to send PMs, which is why I intercepted at a lower level - the PM data handler - but yes, if that could be guaranteed, then I could finally get rid of my one and only core edit. Yippee. Big Grin

(2021-02-26, 01:56 AM)Omar G. Wrote: [ -> ]I think this function needs a hook, even if the data handler get some too.

Agreed.

(2021-02-26, 02:03 AM)Omar G. Wrote: [ -> ]Welcome to the dark world of trying to exploit the threads module as much as possible, building on top of it as much as possible, 👾

Heh. But is it really so dark? Surely, reuse is preferable to duplication.
I will bring the opposite back to live some day:
https://github.com/Sama34/MyShowcase-System
There're a lotta LOC in that plugin!

I didn't install it. What's it do? Showcases... something... but what exactly? And to whom?
It allows you to create custom modules with custom fields, the example data installs a trucks showcase (vehicles), any user can create "showcases" (entries), and it has its permission system for actions (viewing, replying, etc).

A different approach to what xThreads does (exploit the threads module).

@Pavemen left the community and most of his plugins died with it, maybe some could eventually be updated.
I just wanna ask - I see sometimes longer loading times in forundisplay too. I use xthreads plugin. Can somebody summarize the result and how to fix it?

About hooks - these should be added, is there any list? PR would be great, I can do it but let me more info what is ypur latest feedback. Thx
(2021-02-26, 07:00 AM)Omar G. Wrote: [ -> ]It allows you to create custom modules with custom fields, the example data installs a trucks showcase (vehicles), any user can create "showcases" (entries), and it has its permission system for actions (viewing, replying, etc).

Nice. I have a fondness for code like this which seems to hit the sweet spot of abstraction: between the extremes of giving the admin/user so much flexibiility that they effectively have to code everything themselves, and so little flexibility that they can't get anything at all done beyond a rigid strait jacket.

(2021-02-26, 07:06 AM)Eldenroot Wrote: [ -> ]I just wanna ask - I see sometimes longer loading times in forundisplay too. I use xthreads plugin. Can somebody summarize the result and how to fix it?

In summary, the fix which Sharree ended up endorsing is one of the queries I suggested which adds an index to speed up the crucial forumdisplay.php query:
ALTER TABLE `mybb_threads` ADD INDEX `fid3` (`fid`, `sticky`, `lastpost`);

It seems that in his experience (which I'd tentatively say seems reasonable), XThreads was not a meaningful factor in slowing down the queries of forumdisplay.php, but if I'm putting the wrong words in his mouth, then I hope he'll correct me.
(2021-02-26, 07:06 AM)Eldenroot Wrote: [ -> ]I just wanna ask - I see sometimes longer loading times in forundisplay too. I use xthreads plugin. Can somebody summarize the result and how to fix it?

About hooks - these should be added, is there any list? PR would be great, I can do it but let me more info what is ypur latest feedback. Thx

I ran debug?=1 on forumdisplay while XThread was active and the DB processing time was 3 seconds. I deactivated XThreads, and the processing time was still 3 seconds so it doesn't appear XThreads was a factor despite being in the debug query.

Adding Laird's suggested ALTER index is what fixed it for me. Processing time was reduced from 3-4 seconds down to 500-600ms.
ALTER TABLE `mybb_threads` ADD INDEX `fid3` (`fid`, `sticky`, `lastpost`);
So just run this query and we are fine?
Ideally you should first track the reason for your forum to load slow, adding an index might not help.
Pages: 1 2 3