Open Bug 61960 Opened 24 years ago Updated 2 years ago

local folder Empty Trash doesn't compact all local folders, but it should to save space and for consistency across local folders

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: sspitzer, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [patchlove][has draft patch])

Attachments

(1 file, 1 obsolete file)

from n.p.m.mail-news: Empty Trash Folder in NS 4.75/4.76 compacts all folders below Local Mail. In NS 6.0 I have to compact every folder one by one.
reassigning to naving.
Assignee: putterman → naving
QA Contact: esther → sheelar
Should empty Trash compact all folders ?
yeah, I guess so - it did so in 2.x, 3.x, and 4.x (just for local folders, mind you).
nominating.
Keywords: nsbeta1
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → Future
nominating
Keywords: nsbeta1-nsbeta1
Whiteboard: [nsbeta1+]
Target Milestone: Future → mozilla0.9.2
Attached patch proposed fix (obsolete) — Splinter Review
Compact all folders after empty trash. request for review, david ?
r=bienvenu
Whiteboard: [nsbeta1+] → [nsbeta1+]Have Fix
moving to 0.9.3. Please hold onto the changes in case we can get this in later.
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Keywords: nsBranch
fix landed on trunk.
How fast is compacting folders, even large multi-meg folders, and does it make the app unresponsive while it does it? Does it throw up a dialog while compacting letting you know it is compacting if so so you don't get people end- tasking it? I am not a mail/news user, but to me, this seems not to be a function of empty trash, and just because it was the functionality in NS 2/3/4.x doesn't mean it is right or can't be changed. MS OL Express gives you the functionality of selecting a folder and compacting just it File -> Folder - > Compact or compacting all at once File -> Folders -> Compact All Folders I don't necessarily agree thats the right place, but I don't persoanlly think it should be a function of emptying the trash as I can see very big folders making the app seem slow every time they simply empty the trash.
compacting folders in 4.x gives a dialog and can take a very long time depending on what you did to a folder. Compacting a folder that had 2000 entries and now has 0 is very fast :-). Compacting all of my mailboxes tends to take a considerable amount of time. However this bug shouldn't care about that. If you're concerned w/ an indication and can verify we don't indicate please check to see if a bug already exists and if not file one. Warning: there's currently a debate between the people who want progress dialogs and the people who want to use status bars.
I think we should make it a pref, because it take a while to compact all folders if folders are huge.
problem with just making it a pref is do you turn it on or leave it off by default? I'd say off, maybe a right-click context menu option over the recycle bin to turn on/off the pref and activate compaction on emptying. Otherwise it'll become one of those lost features that no one ever changes cause well, the average (read 80% or more) user doesnt do much more tweaking to Netscape/Mozilla then making a couple of profiles. I still say putting it in a drop down also/ontop of my suggestion above would be handy, perhaps the user doesnt want to empty there recycle bin and just wants to compact the folders? Is that even possible at the moment? I am asking as I am not a mail/news user and have no clue.
removing the nsbranch.
Keywords: nsBranch
I have backed out the fix. We need to rethink how to do this one, mainly because it increases time for emptyTrash and needs better user feedback.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Mail news triage meeting --> .9.5
Target Milestone: mozilla0.9.4 → mozilla0.9.5
moving to 0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Blocks: 104166
removing HAVE FIX based on comments about being backed out.
Whiteboard: [nsbeta1+]Have Fix
Target Milestone: mozilla0.9.6 → mozilla1.0
Keywords: nsbeta1-
Target Milestone: mozilla1.0 → Future
My vote is : add a "compact all folders" in the menu, so that ppl who do not activate the option in the prefs can launch the whole operation and have a coffee ...
Note that the same problem occurs with IMAP folders. With "Delete Immediately" set, delete messages in several folders and then select Compact Folders. Only the current folder is compacted (expunged). In 4.x, all open folders were compacted. This problem has existed since early Netscape 6 and still occurs with Mozilla 1.1beta.
I'm not familiar with the Mozilla code at all, but I stumbled across this in nsImapMailFolder.cpp: NS_IMETHODIMP nsImapMailFolder::CompactAll(nsIUrlListener *aListener, nsIMsgWin dow *aMsgWindow, nsISupportsArray *aFolderArray, PRBool aCompactOfflineAlso, nsI SupportsArray *aOfflineFolderArray) { return Compact(aListener, aMsgWindow); //for now } Is this the reason "Compact Folders" only compacts the current IMAP folder?
yes, for imap folders, but this bug is about local folders.
Other question, I remarked latley that I had to "Compact Folders" to get rid of Mails I deleted a half year ago. Thoug the Trash file was empty. Isn't this a problem if not automatically compacted, that it will fill peoples hardrives ? Because if you get attachments regulary all is still stored in the Inbox file. So I think, that Mozilla should do this time based, that the people don't think that Mozilla/NS6 grows the Profile constantly. Also Persons which are working at a University could have a real problem with it, in our University you only got 15 MB space for your /home dir. And 30 MB under Windows. So keeping all Mails until the User compacts the folder is in my eyes not a good idea.
Additional Things: I think it's really time consuming, that you have to do "Compatct Folders" for each Account and each Folder. Compact Folders (as suggested earlier) should Compact all Folders on all Accounts. Optionally you could pop a msgbox that says that this could be a long time taking process. But have to do this manually for each and every thing is bad and only time consuming.
QA Contact: sheelar → esther
mass re-assign.
Assignee: naving → sspitzer
I agree with comment 25 and 26. I expect "empty trash" to recover the space wasted by trash, the same way it works with a real trash can. Now with the horrendous amount of email with virus attachments, folders grow 10 or more times faster than normal, and inbox could easily become dumpster sized, even though the junk has been "deleted", and the trash "emptied". Users don't know what compacting folders is or why it is necessary. Compaction should be automatic by default, with a prefs option for those who know what it is and don't like automatic compaction to be able to disable it.
@Felix I don't even see the need for the hidden pref to disable automatic compaction of folders, when I do not want to be deleted forever I move it to the Trash, when I empty the trash I'm sure it is waste. Also not nice when the FBI comes to your house, and finds e-mails that are actually not there :-)
If it was up to me, the delete button and the delete key would both mean what they say, at least optionally. Hit delete and, _poof_, all gone to the big bit bucket in the sky, with no stops in between, no messing with garbage cans.
Shift delete will delete a message w/o copying it to the trash. However, you still need to compact the folder before the messgage will be removed from the source folder. This is useful for things like undo...
Like I said, if it was up to me, the delete button and the delete key would both mean what they say. If I wasn't sure it would get wontfixed, I'd file a bug to provide that option. I might do it anyway, or maybe file one to suggest replacing the botton word "delete" with "to trash".
I think, the trash or any other folder shouls always be compressed, when exiting the browser, once the folder is empty.
*** Bug 224515 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
*** Bug 325420 has been marked as a duplicate of this bug. ***
Blocks: 177074
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
QA Contact: esther → backend
Product: Core → MailNews Core
Nominating: When people go to the trouble of emptying their trash they are rather shocked to later find all their mail still in their mail folders. An explicit "Throw out the Trash" step is the perfect time to launch the compact action. In fact I would go so far as to remove the explicit compact menu item and just make it synonymous with emptying the trash. (We could keep the space-based auto-compact option for people who really want it, that's a separate decision.)
Flags: wanted1.8.1.x+
Flags: blocking-thunderbird3?
(In reply to comment #37) > I would go so far as to remove the explicit compact menu item I hope you get overruled on this point. I get hundreds of emails every day. I empty trash only at the end of each day. I always compact immediately after emptying trash. I also compact after moving mail containing attachments among folders and when deleting attachments or mail containing attachments. If I don't, performance suffers tremendously.
Certainly we need the compact menu (especially for imap + you may want to compact folders, but keep trash, i know i do). For local folders, sounds pretty reasonable though. For IMAP I think we definitely shouldn't. I don't think we'd block though, marking wanted3+ P3.
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3-
Hardware: PC → All
Target Milestone: Future → Thunderbird 3.0b2
Please provide a pref for that ... In the long-term, hopefully a switch to more efficient mail storage backends will occur ...
calling all UI gurus, given that more efficient storage backend will happen rsn, not and, there certainly is no lack of compact ENH bugs https://bugzilla.mozilla.org/buglist.cgi?short_desc=compact;bug_severity=enhancement;resolution=---;query_format=advanced;short_desc_type=allwordssubstr;product=MailNews%20Core;product=Thunderbird -- nevermind the real bugs
the patch is trivial, and is wanted-thunderbird3+ Is there any reason not to proceed?
Keywords: 4xp
Priority: P3 → --
Summary: local folder empty trash doesn't compact all local folders → local folder Empty Trash doesn't compact all local folders, but it should to save space and for consistency across local folders
Whiteboard: [patchlove][has draft patch]
Target Milestone: Thunderbird 3.0b2 → ---
From Navin Gupta.
Attachment #35829 - Attachment is obsolete: true
Attachment #506315 - Flags: review?(bienvenu)
Comment on attachment 506315 [details] [diff] [review] unbitrotted patch I'm pretty sure this will do strange things if you have empty trash on exit set, as we will start doing a compact during shutdown. I'd suggest doing this in the front end.
Attachment #506315 - Flags: review?(bienvenu) → review-

(In reply to David :Bienvenu from comment #44)

Comment on attachment 506315 [details] [diff] [review]
unbitrotted patch

I'm pretty sure this will do strange things if you have empty trash on exit
set, as we will start doing a compact during shutdown. I'd suggest doing
this in the front end.

Maybe time to "unbitrot" again?

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: