Neil Turner's Blog

Blogging about technology and randomness since 2002

Fixing MT’s Performance

I’ve mentioned a few times that I have been having problems with Movable Type’s performance – high CPU usage and timeouts. The CPU usage turned out not to be caused by MT, but the timeouts were – most of the time when rebuilding pages I would get a blank page because it took so long.
Quack, at Does It Echo? just upgraded to MT4.1 and in doing so he installed Temper – short for Template Profiler. It counts how long each template takes to rebuild when entries are published and outputs the times to your activity log – this means you can then single out any templates which are taking too long.
It turns out that 2 templates were taking over 10 seconds each to rebuild. One was a category archive feed, easily fixed by limiting it to the previous 15 entries, and the other was a block which outputted the ‘recently commented on entries’ code that appears throughout the site, which I’ve disabled for the time being. This has solved the timeout problem, although some other pages are taking up to 4 seconds to build – I’ll investigate these later
But it now means that using MT is much more bearable and it means I have one less reason to switch away from it.

2 Comments

  1. Thanks for the tip. I have noticed that publishing has been painfully slow since I upgraded, so am going to give this a try.
    By the way, I’ve been wanting to implement an accessible “captcha” like the one you have – how did you do that? The one plugin I found I could not get to work (I think it was called TinyTuring).

  2. The plugin I use is ‘Comment Challenge‘ by Jay Allen, who used to be Movable Type’s product manager. It’s designed for version 3.x of MT but seems to work fine on 4.x. You can change the word or phrase needed to be typed in, and the spammers haven’t yet worked out how to answer it correctly, in my experience. In fact the only spam you’re likely to get is spam where a real person has typed in a message manually, which your other anti-spam plugins (e.g. SpamLookup, Akismet, TypePad Anti-Spam etc.) can then sort out.