{"id":226,"date":"2007-03-04T17:30:49","date_gmt":"2007-03-05T01:30:49","guid":{"rendered":"http:\/\/zachfine.com\/blog\/2007\/03\/05\/turbocharge-apple-mail-by-vacuuming-its-envelope-index-database\/"},"modified":"2007-04-24T00:57:54","modified_gmt":"2007-04-24T08:57:54","slug":"turbocharge-apple-mail-by-vacuuming-its-envelope-index-database","status":"publish","type":"post","link":"https:\/\/zachfine.com\/blog\/2007\/03\/04\/turbocharge-apple-mail-by-vacuuming-its-envelope-index-database\/","title":{"rendered":"turbocharge Apple Mail by vacuuming its Envelope Index database"},"content":{"rendered":"<p>I&#8217;ve been using Apple&#8217;s mail application for a while, and I like it, but it has been getting slower and slower over time. It turns out that the culprit, according to <a href=\"http:\/\/www.hawkwings.net\/2007\/03\/01\/a-faster-way-to-speed-up-mailapp\/\">comments on the Hawk Wings blog<\/a>, is that the &#8220;envelope&#8221; sqlite database that Mail.app uses can become larger than necessary, full of empty space left behind when objects have been dropped, and a simple command executed in the terminal reorganizes the data structures. The process (which involves the sqlite command &#8220;vacuum&#8221;) is analogous to defragmenting a disk. <\/p>\n<p>Following the directions on that web site, I quit the Mail application. I then opened <a href=\"http:\/\/www.macdevcenter.com\/pub\/a\/mac\/2005\/05\/20\/terminal1.html\">Terminal<\/a> and ran the following optional command so that I could see the size of Mail&#8217;s Envelope database before and after the cleanup:<\/p>\n<p>\n<tt><br \/>\n% ls -lah ~\/Library\/Mail\/Envelope\\ Index<br \/>\n-rw-r--r--   1 zach  zach       42M Mar  6 00:55 \/Users\/zach\/Library\/Mail\/Envelope Index<br \/>\n<\/tt><br \/>\nI then ran the actual cleanup command:<br \/>\n<tt><br \/>\n% sqlite3 ~\/Library\/Mail\/Envelope\\ Index vacuum index;<br \/>\n<\/tt><br \/>\nThat took about a minute. I then again checked the size of the Envelope Index:<br \/>\n<tt><br \/>\n% ls -lah ~\/Library\/Mail\/Envelope\\ Index<br \/>\n-rw-r--r--   1 zach  zach       25M Mar  6 01:07 \/Users\/zach\/Library\/Mail\/Envelope Index<br \/>\n<\/tt><\/p>\n<p>\nHot damn! The database dropped in size from 42Mb down to 25Mb. I ran Mail, and it popped up near instantaneously. Wouldn&#8217;t you know, it is now lightning fast to open folders full of thousands of messages. Before I &#8220;vacuumed&#8221; the Envelope index, such a folder might have taken upwards of 10 seconds to open.<\/p>\n<p>If you&#8217;re running OS X Tiger and have been using Apple&#8217;s Mail application, do yourself a favor and try <a href=\"http:\/\/www.hawkwings.net\/2007\/03\/01\/a-faster-way-to-speed-up-mailapp\/\">running the commands<\/a> to &#8220;vacuum&#8221; Mail&#8217;s Envelope Index. If Mail.app has been slow, you may be shocked by the increase in speed. At the very least, you&#8217;ll recover a bit of disk space.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using Apple&#8217;s mail application for a while, and I like it, but it has been getting slower and slower over time. It turns out that the culprit, according to comments on the Hawk Wings blog, is that the &#8220;envelope&#8221; sqlite database that Mail.app uses can become larger than necessary, full of empty space [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[14,13,15],"tags":[],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-apple","category-geeky","category-tiger"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/ptNpF-3E","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":0,"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"wp:attachment":[{"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zachfine.com\/blog\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}