Tim Gaden of Hawk Wings fame (and formerly of APC X-Factor fame, sniffle) has documented an excellent tip to speed up Apple Mail.
It involves optimising the SQLite database Apple Mail uses to store indexes and subject lines of emails.
You can check your current 'envelope archive' size by entering this in the terminal:
ls -lah ~/Library/Mail/Envelope\ Index
Then to optimise it (cleans out stuff that has been marked for deletion but not actually deleted, defragments the structure, etc):
sqlite3 ~/Library/Mail/Envelope\ Index vacuum;
Then check your envelope archive size again to see the results…
ls -lah ~/Library/Mail/Envelope\ Index
It compacted my envelope archive down from 55MB to 50MB — not a huge increase, but the speed difference was dramatic.
In particular, my 'sent mail' folder which had been taking 10 – 15 seconds to open (8,000 items) now only takes two or three seconds.
Read the full post and many informative comments here.
- Apple Mail 4.1: Column arrangement doesn't 'stick' in search view
- Superb desktop wallpapers on Flickr
- The campaign to convince Apple to fix its annoying Apple Mail URL breakage bug
- Wow! Apple Computer pays attention to blogger…
- Groan. Apple IS the new Microsoft.
#1 by Gavin on May 31, 2007 - 11:08 am
thanks for that, lets see if speeds me up, I have THOUSANDS of Mails everywhere…
#2 by Chuck on June 8, 2007 - 12:39 pm
Worked great for me. Thanks!
#3 by Tim on September 14, 2007 - 7:04 pm
Been meaning to find a solution to my sluggish mail for weeks now. This worked like a dream. Many thanks.
#4 by Kidpix on September 23, 2007 - 10:44 pm
Great!!!
Thanks!!!
#5 by Jackie on November 8, 2007 - 9:03 am
This is a fantastic tip. I've been searching the web for awhile looking for this answer. I have a fairly new computer and nowhere near the thousands of emails the other person mentioned, but I would still have to wait on Mail to catch up to my typing which was very frustrating! Thanks.
#6 by Bryce on January 3, 2008 - 6:59 am
thanks a lot, seems to have worked
#7 by David Eldridge on February 7, 2008 - 3:16 pm
THANKS! that is so much better. [Sigh.]
#8 by Nick on March 11, 2008 - 8:46 am
This is excellent!
Many thanks, the slowness was starting to drive me crazy on my 125Mb mail (down from 137Mb, but much faster).
What a relief
Note that on large mailboxes, the vacuum can take a minute or two – don't panic!
#9 by evan on March 19, 2008 - 3:00 pm
This worked extremely well for me and will now save me a ton of time previously wasted waiting for mailboxes to load.
#10 by Griff on March 25, 2008 - 1:57 am
hmm,
now 2 of my POP mailboxes have disappeared.
Thanks for that
#11 by Griff on March 25, 2008 - 1:58 am
Make that 3 of them
Brilliant.
Any idea how to get them back without reloading the entire mailbox from the original server ?
#12 by Danilo on September 9, 2008 - 12:33 am
Excellent! It saved me some 15m a day. Thanks!
#13 by drjackso on April 14, 2009 - 5:36 pm
WOW dropped from 137M to 129M, but what a differences in speed.
#14 by Lennon Aldort on June 4, 2009 - 2:38 am
Wow! Thank you! I dropped mine from 88mb to 60mb, and my horrendous slow mail issues are gone! Mailboxes were taking 3 or 4 MINUTES to open sometimes. Everything is snappy now! Thanks!
#15 by Sndl on June 7, 2009 - 6:57 am
I get
"SQL error: database locked"
Is there some way to force optimization for non-admin accounts?
Thanks.
#16 by Will on June 10, 2009 - 8:33 am
OH thank God, when I closed out Mail and reopened my emails appeared and so much more quickly :) hehe, but seriously for those of us not technically astute you might want to add that warning.
#17 by Duende on July 23, 2009 - 12:17 pm
I feel your pain griff but it worked like a charm for me. Thanks Dan
#18 by Cyndi on September 6, 2009 - 6:15 pm
Went from 54M to 39M and it's much faster now, though having trouble with my deleted mail boxes. Thanks for the pointer to the original tip and especially for clarifying it into two easy 1-line commands.
#19 by Carolyn on September 23, 2009 - 5:51 pm
What a difference, many thanks!!!
#20 by patrick on September 25, 2009 - 5:33 am
Change my size from 46M to 6M – greatly speeded up, thanks !!! Great tip – can't believe how I have been struggling …
#21 by Luca on March 3, 2010 - 6:17 am
Dan, I love you! Really, I want to have sex with you!
My letargic Mail now is lightspeed fast! Envelope went down from 120M to 58M!! It is like using a new computer!
#22 by Peter the plonker on August 1, 2010 - 1:42 pm
i have a problem that my apple mail has stopped responding, the icon sits in its tray at the bottom of the screen but does not open the programme so I have to go back through Firefox to find hotmail. also I can not open the programme from the tool bar at the top of the screen. when i come to shut it down or put it to sleep it takes a couple of minutes. this is an IMac 21inch running leopard 10.5.8, 4meg Ram about 18 months old and i love it ,or did do till now. I am a silver surfer who is not too tech savvy. Any ideas please
Peter (pcf43@hotmail.com) England UK
#23 by Chris on August 23, 2010 - 9:19 am
Brilliant!
The vacuuming didn't affect the size much (stayed at 8.8Mb) but got rid of the 60-delay every time I printed something.