MT rebuild type mod

A lovely (but very much not for the faint of heart) MT hack from Sean Willson: mt rebuild type mod changes the options for rebuilding index templates from just “do” or “don’t” to All, Never, Entry, Comment, TrackBack, Entry and Comment, Entry and TrackBack, Comment and Trackback.

The biggest gain is setting your Master Archive Index template to only rebuild when you add an entry, because it tends to be a bear to build, and since it probably doesn’t have any comment or TrackBack counts it doesn’t need to be rebuilt for every ping (with the risk of it taking too long, and having the ping time out even though you really got it, so that you get repinged, and repinged). I saw someone’s timing test results the other day (of course, I can’t find them again), saying that most index templates took on the order of a second to build, and the archive index took what I remember as 15 seconds, which is just asking for TrackBack pings to look like they didn’t go through from the pinger’s perspective.

13 Comments

Comment by Jacques Distler #
2003-05-14 06:44:43

I was pretty excited about this too, util I realized that MovableType is smart enough by itself. Neither the Master Archive Index, nor the RSS feeds get rebuilt if the MTEntryBody of an article is unchanged.

Check the last-modified dates and see for yourself.

 
Comment by Mark #
2003-05-14 07:52:30

I believe it *tries* to rebuild them, going through all the hard work, and then at the last minute realizes that nothing changed so it doesn’t write out the same file again (specifically to prevent last-modified date changing).

 
Comment by Phil Ringnalda #
2003-05-14 08:29:13

That’s it exactly: item four in the 2.51 changelog. It rebuilds a file, compares the MD5 hash with that of the file (or the filesize if you don’t have MD5 installed, which was painful when people changed one letter and couldn’t figure out why the change wasn’t saved), and only saves if they are different.

 
Comment by Phil Ringnalda #
2003-05-14 08:32:51

And although with varying network conditions and varying load from the other people on my server it’s hard to tell, it really seems to me that comments are saving visibly faster than they used to. Closer to real time, while I’m seeing more and more people using MT saying, next to the Post button, ”just click it once, no matter how long it takes, and it could be quite a while.”

Comment by dvd #
2003-05-14 09:22:19

since i implemented this mod, i’m definitely noticing a difference in rebuild time after comments are posted — mostly due to arranging things so that templates that use the wordstats plugin only rebuild after entries are postededited.

 
 
Comment by Ben #
2003-05-14 09:34:31

Yes, the master archive template (really, the <MTArchiveList> tag in general) is slow to rebuild. We have plans to speed it up quite a bit, at least for MySQL/PosgreSQL/SQLite users (by using a SQL query rather than iterating through the entries).

 
Comment by RKB #
2003-05-17 21:46:13

Opting for simplicity over complexity, wouldn’t I just be better off deleting the master archive template? Unless it gets called by one of my other archiving methods (individual, daily, monthly, and category), I guess I don’t see the benefit of even keeping it around.

(full disclosure: even after relentless template modifications, this is the first time I’ve ever actually pulled up archives.html)

Comment by Phil Ringnalda #
2003-05-17 22:21:10

I have seen useful master archive templates, with every way you could possibly find something in the archives all combined on one page, and then that page linked from everywhere, rather than repeating all sorts of archive links in every page. So it’s not completely useless (think of a site with CSS tabs, with an archive tab rather than archive links everywhere), but if you’re aren’t using it, you should definately turn off auto-rebuild for it. Nothing else uses it, it’s just a template that builds a static page, and if you don’t link to that static page anywhere, you’re just slowing down your rebuilds and entry saves and comment posts for no gain. I’ve still got mine turned on, even though there’s nothing really useful there, because I needed something when you work your way clear back up through the URL from an individual entry, and I haven’t come up with anything sensible to put there yet.

 
 
Comment by Gert #
2003-07-04 05:11:25

Perhaps a stupid question, but how do I set my archive templates (I use individual, monthly and categorie) to only rebuild when I add an entry? I’d like to run the MT-rebuild to rebuild them and not everytime when someone adds a comment.

 
Comment by Gert #
2003-07-04 09:23:23

Also, does the placing of a comment get any faster if I remove the commentcount on my archives? It would make sence, since there would be nothing to update in an archive anymore.. But is it?

 
Trackback by Musings #
2003-05-14 11:11:07

Faster MT Rebuilds

Zippy! [Tip ’o the hat to Phil Rignalda.]…

 
Trackback by The Long Letter #
2003-05-14 22:36:58

Speeding things up

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…)

 
Trackback by Among Other Things #
2003-05-16 08:46:51

MT rebuild mod

Am attempting to install Sean Willson’s MT rebuild mod, so hopefully there won’t be any more errors when submitting comments. Hopefully. (Tip from that other…

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.