From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 15 Dec 2007 13:04:10 -0800 Subject: [sup-talk] Using DTrace to profile sup-sync In-Reply-To: References: Message-ID: <1197751337-sup-8140@south> Excerpts from Jjgod Jiang's message of Sat Dec 15 07:05:04 -0800 2007: > When I was trying to build index for my GMail account (which has 28525 > mails in inbox) with sup-sync, I found the estimated finish time is > too long (24 hours) to accept. Actually, large IMAP folders will always present a significant problem for Sup, because IMAP sucks balls. Short story: Sup has to *always* download the headers of the entire mailbox in order to function correctly. So every time you start up Sup you're going to be sitting there, waiting for that to happen, before you can do anything with your IMAP messages. Long story: This is because IMAP provides no way of getting a consistent, cross-session identifier for a single message, which is what Sup needs to retrieve message content when you view a thread. You can read more about why IMAP's UID is useless. (Actually, what Sup really needs is a unique, cross-session identifier for messages, which increments as messages get newer, so that it can tell when new messages have appeared in the inbox. In case you were wondering, the IMAP \Recent flag is useless for this.) So, to get around this, Sup has to construct its own unique message id, based on the size and the internal date of the message. It then maps this internal id into the server's message id, and can finally both retrieve any message in the index from the server, and can check for new messages since the last time it connected to the server. So, if you really have a large IMAP account that you want to index with Sup, the solution is to convert it to mbox. That will solve all your problems. Don't blame Sup, blame IMAP. -- William