You are here: Home Blog Faster, Apple Mail, Faster!

Faster, Apple Mail, Faster!

by Dan Fairs last modified May 29, 2008 09:23 AM
A quick way to improve the performance of Apple Mail.

Leopard's incarnation of Mail.app is mostly lovely. However, when you load it up with tens of thousands of mail messages, it can get a little slow. The usual solution - Rebuild, from the Mailbox menu - wasn't doing it for me.

However, I found this gem of a tip which I wanted to link to in order to improve its Google rank - it took me too long to find it!

It goes without saying that you should back your data up before trying this.

In essence, however:

Shut down Mail

Open Terminal, and enter the following:

hornet:~ dan$ cd ~/Library/Mail
hornet:Mail dan$ sqlite3 Envelope\ Index

You'll then see the SQLite prompt appear. Enter 'vacuum subjects;' and press enter:

SQLite version 3.4.0
Enter ".help" for instructions
sqlite> vacuum subjects;

You'll then have to wait a bit - don't panic, this is normal.

What's happening is that the SQLite database engine (used by Mail.app behind the scenes) is cleaning up data fragmentation and empty data pages within the database file itself. Doing this reduces the amount of disk activity required to read the database, improving performance.

Once you get your sqlite prompt back, simply quit:

sqlite> .quit

Fire up Mail.app again, and you should notice a significant speed improvement. Sweet.

Filed under:
Add comment

You can add a comment by filling out the form below. Plain text formatting.

Stereoplex is sponsored by Fez Consulting Ltd