Performance enhancing branch :)a

Nicolas Sebrecht nicolas.s-dev at laposte.net
Fri Aug 26 19:47:57 BST 2011


[ Sorry for the delay. ]

On Mon, Aug 22, 2011 at 04:11:08PM +0200, Sebastian Spaeth wrote:
> Uploads from local to remote repositories are currently a pain. The
> remote IMAP will assign a new UID and to record that locally we will:
> 
> a) Load the "local" message (that can be via an IMAP server, so
>    expensive)
> b) Save under a new UID (uploading the same message back the the IMAP
>    server, or storing in on our MailDir)
> c) Delete the "local" item.
> 
> All we need to do is: a) rename the file to reflect the UID in the
> Maildir case or b) update the Mapping file in the Mapped IMAP case.
> 
> Please have a careful look at the following 2 patches that implement
> that behaviour by adding a change_message_uid function to the required
> backends. In order to do that, I refactored some code in patch #1 to
> tease out the relevant components (UID, flags, rtime) from a maildir
> message name.
> 
> I am not sure we should simply merge the series as is, it might be
> useful to review and test this a bit. That having said, it seems to work
> for me.
> 
> It would be a major performance boost for sync where we have to move
> messages from LOCAL to REMOTE.

Agreed. This is good material for the test suites...

Since we worked like that for ages, I would be much more in favor to
merge this topic once the test suites up.

Adding topic to my pending patches. ,-)

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list