Could you set the tracelevel to 5 and send the exact imap commands mail.app is generating? This way we might be able to speed things up a bit.


I've gone through and it appears that the imap sections between 1.1-1 and 1.2.1 are identical for my purposes. I can't get 1.2.1 to work properly with the debian patches, so I'm not actually able to experiment on the latest version.

Looking through the code, after every imap command that is performed on a selected mailbox, the db_getmailbox function is called to see if the mailbox has updated. There's got to be a better way to do that.

A few possibilities:

- A trigger on the messages table that on insert/update inserts a record into a mailbox_updated table with mailbox_id and current_timestamp. This would need to be reaped rather often by a maintenance script. Index bloat might be a bit of a problem on psql too. I'd say updates the last modified time, but that could be a contention bottleneck.

- Only do the check once per minute on reads for an individual imap connection, unless that connection does a write or the client explicitly checks for it.

eric

Reply via email to