Performance Improvements in Movable Type 4.2
Module Caching
We have given administrators and designers the ability to cache the HTML created by a template module. Content can be stored in the database or in memcache and can be forced to expire:
- after a designated time period has elapsed
- when an event in the system occurs (e.g. a new comment is received)
This feature speeds up publishing times and decreases database load by limiting the amount of time it takes to process and generate content that may not change that frequently.
Server Side Includes
Template modules have the option of being processed as a “Server Side Include.” Server side includes are a common way for the same content/HTML to be shared across multiple pages on a web site. By designating a template module be processed as an “SSI,” all pages that include that template module will be updated instantaneously with the new content whenever the template module is published on the system. This keeps your site’s content fresher, more relevant and more up to date, without having to republish your whole site.
Publishing Profiles and Strategies
Movable Type is the only blogging platform that supports the following publishing modes right out of the box:
- static publishing
- dynamic publishing
- background publishing
In Movable Type 4.2 we have taken these capabilities and allowed administrators to designate on a template-by-template basis how they wish their content to be published. This allows administrators to optimize their site performance by forcing critical content to be published immediately and without fear of traffic spikes to take down your database; in addition, this allows administrators to designate less critical content to be published dynamically or via a background task to lessen the time it takes to process new comments or TrackBacks.
Faster Search
Search has been completely rewritten in Movable Type 4.2 to take advantage of the full-text search capabilities found in all databases supported by Movable Type. We have also added search pagination. These two features combined have increased search performance by over 100%!
Movable Type’s search backend is also completely pluggable allowing you to swap out Movable Type’s default search infrastructure with one you may prefer.
Publish Queue Priorities
When you publish files in the background via Publish Queue we now assign logical default priorities to the files being generated. This makes sure that your most critical files on your web site are always updated first, and before such files as RSS feeds and About pages.
Performance Logging and Monitoring
We have added an extensive logging framework to capture the time it takes to perform numerous tasks within the application, including:
- how long it takes to render a page in the application
- how long it takes to publish a page on a web site
- how long it takes to process any template tag
These and other actions are captured in a log file allowing users and site administrators to analyze and then to optimize site performance.
And Lots, Lots More
In Movable Type 4.2 we did an extensive and thorough code audit looking for every way we could imagine to increase performance. These changes mean that simply by installing Movable Type 4.2 without making any other changes to your templates or configuration you will see significant improvements. The following are just some of the changes we have made.
Cached Comment Counts
Comment and TrackBack counts are now cached and stored in the database to prevent the need to compute those over and over again. This means pages and entries publish faster then ever before, and dramatically reduce database load in the process making Movable Type more stable and reliable.
Improved Database Indexes and Query Optimizations
Every table and every query in Movable Type was analyzed by numerous database experts looking for ways in which we could optimize database performance. We added numerous new database indexes to speed up page filtering and publishing times, and made additional enhancements to specific queries to reduce query overhead and speed up all aspects of the Movable Type platform.
Memory Utilization Enhancements
Memory utilization was cut in half or more in some instances. We did this by focusing on:
- Better code modularization - Movable Type’s source code was broken up into smaller pieces to reduce the amount of code that needed to be processed to perform simple tasks.
- Just in time object loading - Loading large data sets into memory is now done progressively as opposed to all at once to reduce the amount of memory it takes to iterate over each item in the data set.
- Closed memory leaks - In the process of conducting our performance audit we found and isolated a number of important and obscure memory leaks.
Table-based Custom Fields
Movable Type’s Custom Fields feature now utilizes native database tables to store customer data. This allows for users to sort and filter by custom field data much more easily without worrying as much about the performance implications of doing so.