Hello all, your friendly Ozblogistan Overlord here.
Last week I wrote briefly about slowness being caused by attempts to debug a comments plugin used by several Ozblogistan blogs — Brian’s Latest Comments — in the context of Larvatus Prodeo. It transpires that LP’s database of comments was too large to process without causing errors and slowdowns. During the week I worked on various modifications; these ‘work’ in that they have the correct behaviour and don’t crash, but in actual use they have proved to be unacceptably slow.
Consequently I have asked our blogs to deactivate the offending plugin for a few weeks. Our busiest, Catallaxy Files and Larvatus Prodeo, have done so, which should for now improve performance for everyone.
Why have I asked them to deactivate it for a few weeks? Because yours truly is moving to Darwin to take up a new job. I won’t have my usual computer for 3 weeks, according to the removalists. Once I am settled in I have another plan of attack to try, but until then I will not be in a position to easily fix things. Until then, enjoy the blogging.

Was one of Brian’s latest doomsday thread the cause of the crash I wonder?
The last one I recall, I think was that we were going to get zapped by some gigantic death ray from space. Perhaps that’s the cause of the slow speed.
JC
10 Aug 10 at 10:28 pm
i had a quick look at that plugin and the latest version pulls back every comment in the db and puts it in a giant array. might be the problem.
// This is compensating for the lack of subqueries in mysql 3.x
// The approach used in previous versions needed the user to
// have database lock and create tmp table priviledges.
// This uses more queries and manual DISTINCT code, but it works with just select privs.
$wpdb->get_results(“SELECT
comment_post_ID, post_title
FROM ($wpdb->comments LEFT JOIN $wpdb->posts ON (comment_post_ID = ID))
WHERE comment_approved = ’1′
AND $wpdb->posts.post_status=’publish’
$ping
ORDER BY comment_date DESC;”);
ben
11 Aug 10 at 8:22 am
does Jacques basically host 90% of the oz political blogs now?
jtfsoon
11 Aug 10 at 9:28 am
@Ben:
I believe Jacques has reviewed some of the code already. The additional of the specific POST_ID would limit the comments returned to just that post.
ala WHERE … AND ID = PostID (a number).
Adding an covering index which includes comment_date means that any sorting is done by that index and not afterwards.
For those people wondering what we are talking about. The principle here is “keep wasteful use of resources to a minimum ala only get what is required and nothing more”. Computer resources exist in the form of queues, overload a specific queue and you can expect delays.
Have Fun
Paul
11 Aug 10 at 9:53 am
I’m sure Kerry O’Brien would be able to fix it straight-away. He clearly is a tech-head.
Sinclair Davidson
11 Aug 10 at 10:06 am
ben, Paul;
My three attempts at rewriting the fiddly bits are on yon private blog.
Jacques Chester
11 Aug 10 at 12:18 pm
I’ve also uploaded the last attempt at the code to github. Feel free to play.
http://github.com/jchester/ozblogistan-latest-comments
Jacques Chester
11 Aug 10 at 12:29 pm