If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

(RFE) Renaming a folder probably can take advantage of simple link/unlink in many cases under POSIX.



MailNews Core
8 years ago
2 years ago


(Reporter: ISHIKAWA, Chiaki, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ja; rv: Gecko/20100227 Thunderbird/3.0.3

I noticed that moving a folder seems to "copy" the content to
a newly created file under a different directory. Thus
it takes a long time for a large mail folder.

On a posix-like systems such as solaris, linux, MacOS X, etc., 
many simple cases can be handled by
simple link/unlink without the real copying.

Only when such link/unlink operation fails due to
cross-device operation, and other strange cases, the
current "copy" operation may be invoked to finish the operation.

In this manner, moving mail folder around will be much quicker and

The current slow copying hinders mail folder hierarchy
restructuring very badly if folders are large.

Reproducible: Always

Steps to Reproduce:
1. Find a large mail folder.
2. Try moving it under other folder (or move it in a different position in the
Actual Results:  
TB3 seems to copy the folder content to the new location.

Expected Results:  
TB3 should use the faster link/unlink operation if it is applicable and
only if the sequence fails (like link failed due to cross-device operation,
etc.), it can revert to the current safe-copy operation or something.

I think on POSIX-like systems, link/unlink can be used for more than 95 % of the cases and thus result in much faster operation when renaming takes place.

This may be only applicable to POSIX-compliant systems such as linux/solaris/macos X, etc.
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
You need to log in before you can comment on or make changes to this bug.