defaults write com.apple.mail LogAddressCompletionTimes -bool true
To disable, either set it to false:
defaults write com.apple.mail LogAddressCompletionTimes -bool false
or remove it completely (they default to off, so no setting is as if it is set to false):
defaults delete com.apple.mail LogAddressCompletionTimes
When any of these are enabled, the output is sent to the console log (use the Console application to view, or look at it via /Library -> Logs -> Console -> console.log. Make sure Mail.app is not running when you change these settings. Other methods can be used to change these (Property List Editor, manually editing the .plist file, etc), but the defaults command is pretty simple for this purpose. If you're truly paranoid, backup the .plist (~/Library -> Preferences -> com.apple.mail.plist) prior to messing around with this (again, do this after you quit Mail.app).
Read the rest of the hint for the full list of defaults options.
The function of many of these is pretty evident from their names, some less so; I've provided descriptions for those I've been able to detect so far. The various settings (this applies to Mail.app 1.3.9v619, as on 10.3.5, so who knows what may happen on earlier and later versions) are:
- LogAddressCompletionTimes - time it takes to find an address suitable for completion
- LogComposeWindowTimes - time to open a new compose window
- LogDateColumnTimes - time it takes to load "date widths"
- LogDeliveryTimes - time to send a mail out
- LogFlagChangeTimes
- LogHeaderJunkMailActivity - information as Mail.app scans a message's headers
- LogIMAPFetchTimes
- LogIndexingTimes - time to index a mailbox
- LogJunkMailActivity - some statistics on the internal junk mail filter
- LogMailboxesDrawerDrawingTimes - time to draw the drawer with the list of mailboxes
- LogMailboxOpenTimes - time to open the displayed mailbox
- LogMailImportActivity
- LogMessageDeletionTimes - time to delete a message
- LogMessageLoadTimes - time to load a full message (for display only?)
- LogMessageThreadingTimes - time to figure out message threading information
- LogMessageTransferTimes
- LogNotificationActivity - very, very verbose, logs info on all application notifications
- LogPOPFetchTimes - time it took to grab mail via POP
- LogRouterActivity
- LogRoutingTimes
- LogSocketTimes - timing information for a network socket (when it does POP/IMAP, not outgoing)
- LogSortTimes - time to sort the displayed mailbox items
- LogTableViewDrawingTimes
- LogTransferOperationTimes
- LogWindowDrawingTimes - time to display the window

