MyBB Community Forums

Full Version: MyBB 1.6 Optimizations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2010-12-23, 12:56 AM)labrocca Wrote: [ -> ]forumdisplay.php

Alright, but you said showthread.php here:
http://community.mybb.com/thread-84797-p...#pid619355

(2010-12-22, 10:47 PM)labrocca Wrote: [ -> ]...
Here is query:
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $visibleonly $uid_only", array('limit' => 1));

This is actually a huge query that was also locking up tables and taking forever to complete. The query is not using the datecut of a forums that is handy to minimize server load. This should immediately be reviewed to be optimized by MyBB. With 800k threads and this query sorting the entire table with ever thread view it's a monster. I'm forced to simply comment out the lines in showthread.php for now.
...

And in showthread.php, it doesn't need optimization since it will only run the query if you can only view your own threads or if thread count is 0.

As for forumdisplay.php, I've just looked at the code and it seems that there isn't much they can do. They're using the forum counters where it is possible to use. When a datecut is specified, you just can't use them.

However, it's kinda "weird", because a date cut _should_ always improve performance because it _should_ load less things. However, in this case, the date cut will require more resources, probably the opposite of what the datecut should do Toungue

However, isn't this in 1.4 already? The $threadcount variable (in forumdisplay.php) is used for the pagination, not the breadcrumb.
I've written this so people can quickly see what's changed between any two versions of MyBB, to see what could have caused any problems... upload to your forum file root on your localhost (don't put it on a live site as it doesn't perform any checks on the zips), make sure ./uploads/ is CHMOD to 777, then just browse for the 1.4.14 and 1.6.1 zip, or whatever two version you want to compare.
[attachment=20937]

I know text editors usually have a diff report utility built in but this'll do the whole package, don't immediately know of anything else that does that.

If it's useful to track differences, good, if not, it kept me occupied for a bit Smile
Thanks Matt. I was going to run a diff anyways. I've manually checked the files giving me trouble. It's mainly the 3 big ones...showthread, index, and forumdisplay. Everything else seems under control.

@Pirata ... I started talking about forumdisplay here:
http://community.mybb.com/thread-84797-p...#pid619411

I was all over the place yesterday. It's been a very hectic couples days. HF is very touchy. The slightest changes seem to add heavy load. I'm serving almost 1 million pages a day so even 1 query that isn't optimized can backup MySQL completely. I also think because I was down so long doing the upgrade that when I came online there was a rush of activity.

Right now it's all good but I've butchered core files. I plan on reverted some of my changes slowly to review performance. The process is cumbersome but no way around that.

@Tomm...I'd like to see a switch for the new breadcrumb feature. I find the feature a bit awkward and reviewing the code I think a switch would be easy to implement.
(2010-12-23, 09:13 PM)labrocca Wrote: [ -> ]Thanks Matt. I was going to run a diff anyways. I've manually checked the files giving me trouble. It's mainly the 3 big ones...showthread, index, and forumdisplay. Everything else seems under control.

@Pirata ... I started talking about forumdisplay here:
http://community.mybb.com/thread-84797-p...#pid619411

But the post I quoted was the showthread one:
http://community.mybb.com/thread-84797-p...#pid619416


So I was confused. Is it a big deal? It happens. I had a lot going on.
Pages: 1 2 3