Closed Bug 1681189 Opened 5 years ago Closed 2 years ago

Moving all messages to empty folder done piecemeal

Categories

(Thunderbird :: General, defect)

Unspecified
Linux
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: eyalroz1, Unassigned)

Details

I have two folders, FolderA and FolderB (in case it matters - one is in a POP3 account's folders and the other is in the Local Folders ). FolderA has lots of messages; FolderB is empty (and has just been created, so no compaction is necessary).

Now, when I move messages from FolderA to FolderB, my status bar starts counting pretty slowly - one at a time, perhaps 5-10 at a time (i.e. between displays of the number of messages). This suggests individual messages are read from FolderA and written to FolderB.

This is inefficient. Improvements may be feasible in various scenarios, but certainly for the case of moving the entire contents of one folder into another, empty folder, something along the lines of:

  1. Lock access to the folder files' filesystem directories.
  2. Move FolderA's mork file to some temp file
  3. Move FolderB's file to be FolderA's file
  4. Move tmp to be FolderB's file
  5. Release the lock

Now, if the move itself was expensive, you could argue that it's "better" not to do this. Maybe. But when the move is on the same filesystem, it actually takes no more time than copying a single message. So why isn't this done?

reporter is gone.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.