<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #2963: optimization: link() can be used in e.g. mbox-hook for maildirs



#2963: optimization: link() can be used in e.g. mbox-hook for maildirs

 if source and destination mailboxes are maildirs and the both are
 on the same filesystem, link() (and unlink() for source email if link()
 succeeds) can be used instead of
 read() and write() as an optimization, if there have been no modifications
 in the source email (e.g., deleted attachments).

 maildir_flags needs to be made extern instead of static.
 it can be used in constructing the destination filename for link().

 I'd also recommend that you update maildir format to newer one.
 http://cr.yp.to/proto/maildir.html

 I have made these changes this way:
 1) add function mutt_move_message into copy.c
 2) in mx.c, before mutt_append_message, try to call mutt_move_message.
 this is pretty simple.  I have been testing a bit and it seems to work...

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2963>