If all has gone well, I should have just sped up my site when processing new comments or trackback pings, thanks to Sean Willson’s mt rebuild type modification.
Technical details follow (Kirsten, you’ll want to look at this one…)
(via Phil)
By default, MT rebuilds all index templates whenever an entry is created or edited, or when a comment is added. This is done to keep everything as up to date as possible, and is as it should be.
However, as a site grows, and as more bells and whistles are added to it, the time it takes to rebuild all those templates keeps growing. The usual set of index templates includes the main index page, the RSS feed, the main archives index page, the CSS stylesheet, plus whatever archive pages may be set up — all this has to be rebuilt, along with the page for an individual entry, whenever anything changes on a site.
I’d already done what I could to speed up my rebuild by setting my stylesheets to only rebuild when I specifically tell them to (as they normally don’t change), but I’d also added a few more index templates to the mix (the excerpts for my main table of contents page and a secondary RSS feed). All of this was what has caused my server to run so godawfully slow whenever comments or trackback pings are received.
Sean’s modification changes the way MT’s rebuild system works, though. While by default, MT only allows you to set whether a particular template is an index template (and therefore needs to be rebuilt regularly) or not, with this modification in place, there is much finer control over which templates are rebuilt under what circumstances.
So now, my table of contents excerpts, master archive list, and RSS feeds will only rebuild when I add or edit an entry. The main index file will rebuild whenever entries are added or edited, or when new comments are received. Additionally, individual entry pages should rebuild when trackback pings are received automatically, instead of my having to rebuild them manually (which is what I’ve been doing).
Kirsten — the reason I wanted you to peek in on this one is that as this is a modification to the MT system itself, and not just my weblog, you may need to go into your templates and set the rebuild options for each one. Everything may work normally if you don’t, but I’m not entirely sure how it will work if those fields haven’t been set, and you try to add an entry. The changes should be fairly obvious (you’ll need to go into the edit screen for each template, and choose the right option from the new drop-down menu), but if you need any help, feel free to e-mail me or IM me if it’s late enough. Hopefully this doesn’t leave you grumbling at me! ;)