Speeding up comments
If you haven’t noticed, comment submission has been even slower than usual here. I “upgraded” to Jay Seae’s notifier for comment subscriptions, and it seems to be even slower than the original PHP version. So I’ve turned that and Blacklist off, at least until I get the blog rebuilt with my new speed measures implemented.
First, I deleted all the dollar signs from MT tags. Not sure why this speeds things up, or why the tags still work at all, but they do and the speed is much better. Then I commented out the rebuild sections of lib/MT/App/Comments.pm so that it doesn’t rebuild the main index, the category archive, the date archive, and the individual post every time you submit a comment. Instead of rebuilding I wrote some PHP code to get the number of comments straight from the MySQL database. The whole reason it was taking five minutes to submit a comment was that it was rebuilding whole pages, some of them close to a meg long, just to update that one little number.
I had to delete the Recently Commented sidebar item, unfortunately. I’ve yet to figure out a way to get that to load straight from the database. I also had to turn off inline comments on the individual post pages; You’ll simply have to click the comments link at the bottom to read them from now on.
Once I finish rebuilding, comment submission should take only fifteen to twenty seconds. If it’s around a minute with Blacklist and notifier applied then I’ll turn those back on. Otherwise I’ll wait until I get my fast server rebuilt.
Update: Figured out that it was Blacklist doing most of the slowing, so I turned that off and turned the new notifier on. Comments should submit in about 30 seconds under 10 seconds now. Let me know if they don’t.
Update Two: I guess that using the notifier plugin really was an upgrade. Now comment subscriptions cooperate with the blacklist (except that the blacklist slows things down so horribly I’ve turned it off for now), the info is stored in MySQL, and it’s a lot faster. I’ve updated the notifier with all the previous subscriptions since there were only about ten.
I also figured out how to haul enough comment info out of the database to reinstate the Recently Commented feature. I would pull the entire comment text out so I could do inline comments, but I wouldn’t be able to do smilies and the like, so forget it.
Update the Third: Oops, I may have accidentally insulted Jay Allen and his excellent plugin. For the record, let me make it clear the I don’t think that Blacklist is at fault in my comment slowness. It barely added any time to comment submission on my real server, and it’s always done it’s job really well, but since I had to go to the backup linux box everything is just slower.
Hopefully it’s a conflict with another plugin, as Jay theorized. I emailed him a list of my plugins, I’ll let you know if he spots a fix.
Final Update: Ok, got it all figured out. I
Popularity: 1% [?]
Somewhat unrelated: what’s up with Beth’s blog? In the past few days I could only see the sidebar on the left but the rest was blank. I haven’t checked today, mind you… perhaps all is well once again.
The default action of MovableType is to print entries from the last N days. If you haven’t posted in the last N days, you get a blank blog. But she posted yesterday, so everything will look fine now.
You are correct, her latest post appears.
Ok, so you’ve still got Blacklist installed and running? What kind of system do you have hosting this site? I used to use PHPnuke, but I’ve had a lot of troubles migrating my site from Windows to Linux.
Much better. I didn’t take a stopwatch to it, but it felt like 10 seconds.
No, I dumped Blacklist. It takes about three minutes to submit with it running.
I’m running this on a PII with 256 megs of RAM. The OS is RedHat 9.
While MT-blacklist may have something to do with it, it alone is not the cause of your problems (as can be proven by thousands of other blogs running it just fine). Most likely you are running another plugin which, for some reason I have never encountered, is creating a conflict.
You WERE going to email me about this, weren’t you?
Ok, got it all figured out. I’d put some code into ./lib/MT/App/Comments.pm that stopped MT from rebuilding anything at all (indexes, individual entry, anything!) when a comment was submitted. I didn’t notice that this code was being overrun by the Blacklist.pm function that is used instead with that plugin is installed. Now I’ve got Blacklist, notifier, all other plugins turned on and comment submission is fast fast fast.
Yay!
Ask Jay Allen to contact Katharyn please
What, I’m not contactable enough? anything at jayallen dot org, sweetheart.