Can Apple Mail be optimized to perform well when I have 30k messages in my inboxes?
The easiest thing to do is clean up the index file Mail uses to track the messages:
sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum;
Thanks for this tip to the estimable Brett Terpstra. The linked article explains how to make an AppleScript file to measure things before and after to see if the operation thinned out the size of the file Mail uses to store the pointers to the messages. I would add, quit Mail and make a backup before trying to clean the file. A vacuum
operation is normally harmless, but why not get a backup just in case.
Also, this thread probably goes back to @bbum and his weblog-o-mat and perhaps even deeper back...
For me the sqlite3 vacuum didn't speed Mail.app back up.
The thing that returned my Mail.app to blazing fast speeds was deleting the mail sandbox folder.
- Quit Mail.app
- Delete the folder
~/Library/Containers/com.apple.mail
(userm -r ~/Library/Containers/com.apple.mail
from Terminal, or in Finder press Cmd-Shift-G, enter~/Library/Containers
then find thecom.apple.mail folder
and drag to trash and empty trash) - Relaunch Mail.app
Source: https://discussions.apple.com/message/20662231#20662231