MyBB Community Forums

Full Version: Troubleshooting slow performance in a subforum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Some details to start with:

Subject: slow performance on a single, specific subforum. (subforumB, the problematic one)
URL: I prefer not to disclose it at this moment.
Version: new installation of MyBB 1.6.3 and migration of 2 subforums from phpBB 3.0.8
Number of threads in this subforum: 273,000 threads
Number of posts in this subforum: 643,000 posts
Page Generation Time: ~ 10.0 seconds (when listing threads)
PHP Processing Time: ~ 2.0%
DB Processing Time: ~ 98.0%

I don't know if this issue might be related to some issues I had when migrating from phpBB 3.0.8. Basically, I migrated 2 (sub)forums from a phpBB site to a new domain and new installation of MyBB. I will call them subforumA and subforumB.

subforumA: 3,800 threads and 9,200 posts
Page Generation Time: ~ 0.2 seconds (when listing threads)
(~ 35.0% PHP / ~ 65.0% MySQL)

subforumB: 273,000 threads and 643,000 posts
Page Generation Time: ~ 10.0 seconds (when listing threads)

It is obvious that subforumB has way more threads and posts than subforumA. But even so, I don't think it's normal to take that long to load every single page when listing threads within that subforumB.

I wouldn't know how to read the problematic queries in MyBB, so I'm enclosing the extended MyBB Debug Information as an HTML file, for you to please have a look and shed some light in here.

Thank you very much! : )
This is a known issue that was caused by a bug fix for 1.6.3, which has been fixed again for 1.6.4. In ./forumdisplay.php, line 709:

GROUP BY t.tid

Remove this; assuming you don't let guests rate threads, this won't cause any problems and should fix the slowness.
Thanks Matt! : )

I'll try that fix.

Would be possible to know the ETA for 1.6.4?

Thank you!
We don't set release dates, we release updates as and when they're ready, but it shouldn't be long now. That change should fix this immediate issue though.
Hi again Matt,

Just to double check. I didn't find that info in line 709. I found it in line 1417.

		LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid = t.prefix)

		WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2

		GROUP BY t.tid

		ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2

		LIMIT $start, $perpage

I quoted 2 lines above and 2 lines below, to make sure that's the line we're talking about.

Thank you!
Hmm, seems your files have double line spacing for some reason, so the line number would be doubled to 1417, but yes, that's the GROUP BY t.tid bit you're after.