Open Bug 759360 Opened 12 years ago Updated 2 years ago

Make automatic compact more efficient, by intelligently choosing which folders to compact

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: wsmwk, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Automatic compact fully compacts all folders that have deleted content when preset NN MB will be saved. (in fact the status bar shows *all* folders being evaluated and "opening" and "compacting", not just folders that have deletions)  But this can come at a high cost. For example, if folder A is 2GB and the compact will only save a fraction of it's space (perhaps only two small messages were deleted) then is it worth compacting that large folder?

If some simple assessment were made for each folder before it is compacted, each automatic compact pass would be faster and more efficient.  I'm not sure what that assessment might be, but it could be as simple as fixed percentage of the size of the folder.  I'm not sure, but perhaps there should still be a "full" automatic compact should be done periodically.

This might help mitigate some issues linked to bug 498274 - though no one should assume most problems will go away.  It should also help with Bug 749983, although not in the way the reporter is looking for.

Manual File, "Compact Folders" should not be changed.

Note: Bug 711765 proposes to a percentage aggregate space setting for the compact threshold, but it doesn't solve the issue of this bug.
this should also help conserve a small amount of battery power for laptops
OS: Windows 7 → All
Hardware: x86 → All
Version: 13 → unspecified
Summary: Make automatic compact more efficient → Make automatic compact more efficient, by selectively choosing folders to be compacted
as noted in bug 677093, we might be attempting to compact newsgroups when there is fact nothing to compact.
OMG, I just realized this bug exists.
I thought folders were compacted in a per-folder basis, that is, when a GIVEN folder has more than N MB of wasted space, it would be compacted. Instead, all folders are compacted at once. It's simply ridiculous.
I don't think the threshold should be changed from a fixed amout of MB to a percentage. Fixed amount of MB is just fine, but it should be per-folder, not global.

It's simply RIDICULOUS that whenever a folder needs to be compacted, all folders are. How can this have survived for more than 2 years??
See Also: → 711765
Summary: Make automatic compact more efficient, by selectively choosing folders to be compacted → Make automatic compact more efficient, by intelligently choosing which folders to compact
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.