Optimizing Mac Address Book Contacts Feb 02
words • Send to Instapaper

The latest Facebook for iPhone version brings contact sync to your address book to & from your iPhone.

The downside from this otherwise handy feature is a larger address book database size, anecdotally, I’ve experienced a 500% increase of both my address book application support folder, and combined vCards (when you select all, drag and drop your address book contacts to desktop/finder).

It might not be a problem if you have a few hundreds of fairly managed address book contacts, but when you have over 1000 (I have over 2700 items per this writing), syncing with the iPhone and/or MobileMe take its toll; what usually a 3-5 min sync time can go up to 20-60 min. Something needs to be done.

Go or No Go

Navigate to: “~/Library/Application Support/AddressBook” and see if you can find a folder named “Images”, do a Get Info and check the size of your folder. If it’s under 10 mb, you may stop reading, if it’s over 50 mb, you may want to grab a cup of coffee and read on.

Let’s Go

Before you begin, make sure your address book is backed-up, and the address book app & sync is not running. You can either choose to back up in either or all of these methods from Address Book:

1. Menu: File > Export … > Address Book Archive 2. All Contacts > Select All Contacts, drag & drop to desktop to create a combined vCard files.

Step 1: Add JPEG extension to the files

The files under the “Images” folder are JPEGs, but in my case the extensions are omited, so first let’s backup the folder (compress to zip/duplicate) and batch rename the files, my tool of choice #1 is the free Name Mangler app from Many Tricks.

Choose Add extension from the preset (type jpg on the extension text field on the right pane), select all the files, drag & drop it to name mangler’s window. Click the ‘check’ button to confirm the action and proceed.

Step 2: Optimize the Files

There are ways to do this, but free utility #2 is ImageOptim, a free, open-source app to batch optimize images.

First, go to Preferences upon launching ImageOptim, and drag the optimizing slider to 80% — I’m not sure how much difference it effects the final result — feel free to experiment.

Select all the extension-added-image-files, drag & drop it to ImageOptim’s window. The app should begin optimizing the files.


Step 3: Restore file name to original (remove extension)

Right now, the files should have gone through a big diet, check the folder size (Get Info) and see how much you have saved.

To restore the filename to its original state, follow step 1, but this time, instead of jpg, leave it empty (make sure there’s not even a ‘space’ in the text field where you put jpg earlier. Press the ‘check’ button to confirm the action and proceed.

To see how much have you optimized your contacts, repeat step 1 (backing up your address book) and Get Info the combined vCard size. I have gone from 50.6 mb to just 12 mb, and a quick MobileMe sync was done in less than 5 min.

Good Luck!