« Phone Review: Samsung SCH-a950 | Main | Recyc-O-Lantern »
Slowing Performance of Movable Type
I was noticing today that saving a blog entry had started to get really slow. So, I did the natural thing. I googled about for others with similar issues. Minutes later, I found the following two sites: underscorebleach.net and Don't Back Down.
As it turns out, the problem is with the default category archive templates. They put every single post in a category in its entirety on a single page. Any time any post changes (comments, trackbacks, content, etc.) in the category the entire page needs to be rebuilt. This is not a big deal with categories that have 10 items in them. For ones with hundreds, this becomes a huge problem. (My own gadgets category has over 150 posts in it.)
So, the first solution is to make that page smaller and simpler. Examples of this are given at the first link above. This is also the method I have implemented now. Basically, instead of full text to all posts in a category I have the full text to the first 10 posts and an index of all posts in a category. (Note that monthly archives only have this problem on very active blogs. Posting 3-4 times a day would cause slow downs towards the end of the month.)
The second solution is to use smarty in conjunction with dynamic templates to create a fully paginated category archive. The second link above gives code details on how to do this. That site also seems to have implemented this on comments, which can also cause issues.
Another partial solution is to just switch the category archives to dynamic. This would speed up publishing, but may slow down the loads on the category archives. These archive pages are often near the top of my load list. Naturally, that's because they contain the full text to everything I've posted. So the first solution should actually direct people to the actual posts rather than an index with all of the posts.
In any case, hopefully posting comments and articles into the gadgets category will be faster now. ;)
Posted by Shane on October 30, 2005 8:59 PM | Permalink
TrackBacks
http://www.kf6nvr.net/mt/kf6nvr-tb.cgi/623
