soeren says

Pruning Mail’s Envelope Index

March 4th, 2007

Via Daring Fireball Linked List: Hawk Wings details “A faster way to speed up Mail.app”.

Also via Daring Fireball Linked List: Bill Bumgarner explains the how’s and why’s in detail.

There’s a number of AppleScript-based automations of this “vacuuming” process, but I prefer a launchd / shell script-based one that I hacked up. Rather than being manually invoked (or scheduled to run at an interval), it automaticall runs whenever the database is accessed. If it’s locked (because, say, Mail is writing to it), it’ll be ignored; if it’s accessible, it’ll be pruned. Because this therefore occurs so frequently, it takes up a miniscule amount of time. I was considering releasing this solution to the public with an installer and all, but I get from Bill’s essay that the effect ought to be hardly noticeable anyway. Not exactly my experience, but we all know about the placebo effect.

Erik Barzeski says PulpFiction simply does this clean-up whenever it quits, and I fully agree that that’s how Mail should do it as well (certainly far better than not doing it at all). This could be added on through an InputManager/SIMBL plug-in, but… nah. That’s ugly.

If someone still wants it, I’ll reconsider. Whatever the case, it was a nice exercise for my (relative lack of) launchd skills. Nice tool.

Posted in Chuckellania, Mac, Programming, Software

Share | No Comments

Your Own Thoughts

I'd love to hear your input. Just try to stick to a few rules:

Before you comment for the first time (or, after you have deleted cookies), you will have to answer a little challenge to prove that you are not a spammer.

Comments are written in Markdown.

Leave the country the same, but correct the continent, and end the sentence with a period instead.