Is Apple Mail running slow? Speed it up

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.

Advertisements

47 thoughts on “Is Apple Mail running slow? Speed it up

  1. Jackie

    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.

  2. Jackie

    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.

  3. Nick

    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!

  4. Nick

    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!

  5. evan

    This worked extremely well for me and will now save me a ton of time previously wasted waiting for mailboxes to load.

  6. evan

    This worked extremely well for me and will now save me a ton of time previously wasted waiting for mailboxes to load.

  7. Griff

    Make that 3 of them
    Brilliant.
    Any idea how to get them back without reloading the entire mailbox from the original server ?

  8. Griff

    Make that 3 of them
    Brilliant.
    Any idea how to get them back without reloading the entire mailbox from the original server ?

  9. Lennon Aldort

    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!

  10. Lennon Aldort

    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!

  11. Sndl

    I get

    “SQL error: database locked”

    Is there some way to force optimization for non-admin accounts?

    Thanks.

  12. Sndl

    I get

    “SQL error: database locked”

    Is there some way to force optimization for non-admin accounts?

    Thanks.

  13. Will

    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.

  14. Will

    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.

  15. Cyndi

    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.

  16. Cyndi

    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.

  17. patrick

    Change my size from 46M to 6M – greatly speeded up, thanks !!! Great tip – can't believe how I have been struggling …

  18. patrick

    Change my size from 46M to 6M – greatly speeded up, thanks !!! Great tip – can't believe how I have been struggling …

  19. Luca

    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!

  20. Peter the plonker

    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 pleasePeter (pcf43@hotmail.com) England UK

  21. Chris

    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.

  22. Ziv

    Made a huge difference. THANK YOU:

    zivs-computer-4:~ ziv$ ls -lah ~/Library/Mail/Envelope Index
    -rw-r–r– 1 ziv ziv 87M Sep 21 17:09 /Users/ziv/Library/Mail/Envelope Index
    zivs-computer-4:~ ziv$ sqlite3 ~/Library/Mail/Envelope Index vacuum;
    zivs-computer-4:~ ziv$ ls -lah ~/Library/Mail/Envelope Index
    -rw-r–r– 1 ziv ziv 80M Sep 21 17:12 /Users/ziv/Library/Mail/Envelope Index

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s