Pages

Thursday, April 22

How to make Mail.app go faster

For those of you that use Mail.app for a Mail client on your Mac..  This is one way to speed it up.

Go open your Applescript Editor and paste this in there:
tell application "Mail" to quit

set sizeBefore to do shell script "ls -lah ~/Library/Mail | grep -E 'Envelope Index$' | awk {'print $5'}"

do shell script "/usr/bin/sqlite3 ~/Library/Mail/'Envelope Index' vacuum"

set sizeAfter to do shell script "ls -lah ~/Library/Mail | grep -E 'Envelope Index$' | awk {'print $5'}"

display dialog ("Mail index before: " & sizeBefore & return & "Mail index after: " & sizeAfter & return & return & "Enjoy the new speed!")



tell application "Mail" to activate


This script came from here.  However, if you copy and paste it from that website you have to correct all the quotes and single ticks in the whole script.  Hopefully my above paste makes it better.

For background on what this does, this script cleans up the sqllite "Envelope Index" database that Mail.app uses to store it's list of emails and attachments.  If you clean this up, Mail.app starts and runs a TON faster.  Check out more here.

No comments: