Implement change_message_uid

Previously, assigning a new UID to a mapped IMAP or Maildir repository
was done by loading the "local" item, saving it under a new UID and
deleting the old one. This involved lots of disk activity for nothing
more than an effective file rename in Maildirs, and lots of network
usage in the MappedUID cases.

We do this on every upload from a local to a remote item, so that can
potentially be quite expensive. This patch lets backends that support it
(Maildir, MappedUID) efficiently rename the file rather than having to
read the mail content, write it out as a new file and delete the old
file. This speeds up uploads from Maildir and the MappedUID server.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2011-08-30 10:52:11 +02:00
parent 09ce56c594
commit de537dc09c
5 changed files with 93 additions and 37 deletions

View File

@ -16,6 +16,10 @@ New Features
Changes
-------
* Uploading of Messages from Maildir and IMAP<->IMAP has been made more
efficient by renaming files/mapping entries, rather than actually
loading and saving the message under a new UID.
Bug Fixes
---------