UIDONLY implementation notes
I implemented the IMAP UIDONLY extension in Archiveopteryx a while ago. A couple of notes:
It was really simple; two lines of code changed to six lines starting at line 1154, plus a few lines to announce the extension etc.
It didn't bring any any performance improvement, because generating the EXISTS response is mandatory. With UIDONLY Archiveopteryx counts messages in order to report how many there are in an EXISTS response. Without it, Archiveopteryx makes a list of messages. The loop is the same.
It ought to improve performance for the case where a connection opens a large mailbox and another connection already has opened that. This seems rare with Archiveopteryx. It's more important than it seems though: Opening really large mailboxes can take many seconds. I decided to leave the code in.