Mac OS X Mail Application Slow - FIX (Rebuild Database)
If you recently upgraded Mac OS X to 10.10, you'll notice the Mac Mail application seems much less responsive - depending on how many email addresses you have added to it. The command below will clean up and rebuild the database Mac Mail stores information for all your email messages.
Backup any stored archive folders you're saving on your Mac before running.
Terminal - sudo:
sqlite3 L*/C*/*.mail/*/L*/*/*/C*.db vacuum; sqlite3 L*/M*/*/*/E*ex vacuum