If you find Mail.app is getting a bit sluggish, it might be time to give it a spring clean. One option is to vacuum the database. There is no guarantee this will speed up Mail.app, but it is worth a try. Before doing this make sure you have a back-up of your Mail folders (/Library/Mail/V2/MailData). That should be as simple has having a current Time Machine backup.

You’ll need to issue the following command in Terminal.app:

That command will work on OS X Lion and Mountain Lion. The command for Snow Leopard is:

Let me know if it makes a difference to performance.

To see how much it reduces the size of your database you can issue this command before and after the vacuum command:

For Lion and Mountain Lion

For Snow Leopard and earlier:

That command will show you the size of the database, with output looking something like this:

The 2nd line is the output, the first is the command I used. The size info is the data I have highlighted in yellow.

Enhanced by Zemanta