Eyes, JAPAN Blog > More speed for Mail.app

More speed for Mail.app

sascha

この記事は1年以上前に書かれたもので、内容が古い可能性がありますのでご注意ください。

Recently I encountered a problem of a user being slowed down massively my Apple’s Mail.app when the number of items grow too much over time. In this case Mail.app might be slow to start-up and not as snappy as it should be during normal usage. For OS X 10.6, this can be fixed as explained below (I haven’t checked it on other versions, but probably it will be similar).

To store all its data, Mail.app is using a local SQLite3 database in ~/Library/Mail/. And databases (as well as hard disks) can become fragmented over time because usually there is quite a number of inserts, deletes and so on happening. This grows the size of the database file and makes it difficult to actually get data out of it. To fix this issue there is an option to rebuilt the database with the command “vacuum”. Using this properly rebuilds the database and makes data access much faster.

So to fix this issue for Mail.app specifically execute the following commands and you’re done (but always make a backup first, just in case something goes wrong! I am not guaranteeing for anything.).

cd ~/Library/Mail
sqlite3 Envelope\ Index

vacuum subjects;
vacuum addresses;
vacuum messages;
vacuum attachments;
vacuum threads;

When finished, push Ctrl-D to exit.

Comments are closed.