5 ms·
Unless you are extraordinarily low on disk space, you should never need to "wait" to delete things so speed shouldn't matter. The correct method is to immediat
by makecheck 9y ago
Unless you are extraordinarily low on disk space, you should never need to "wait" to delete things so speed shouldn't matter.
The correct method is to immediately move/rename the target, then launch an expensive delete in the background. That frees up the location you are trying to use.
I used to see people set up entire workflows that started with, essentially, "wait 20 minutes to finish recursively deleting the previous data" instead of just "move it out of the way and start immediately".
- captainmuon 9y agoOf course, ideally windows should do that behind the curtains itself...
- icebraining 9y agoThat's essentially what sending to the Trash does, AFAIK.
- softawre 9y agoYep. Recycle bin is a hidden folder that exists on every drive.
- coldtea 9y agoSending to the trash doesn't free the space until you empty the trash.
- reificator 9y agoYes but it frees the path to be used for new/replacement files "immediately".
- coldtea 9y agoNot if you don't have the space.
- reificator 9y agoWhich is why the first comment in the chain led with that caveat.
- kasabali 9y agoiirc trash in Windows has a quota so it should trim eventually
- maxxxxx 9y agoSending to the trash still takes an eternity.
- captainmuon 9y agoYes, but then emptying the trash takes forever. I mean when Shift+Deleting, or emptying the trash, Windows should: - mark the folder as "garbage" in the filesystem and rename it to something impossible to free up the name - hide the folder from the UI (apps should not see the file anymore) - schedule a real deletion (reclaiming the space) with low priority in the background - in case of a crash, chkdisk should detect garbage files and delete them.
- Houshalter 9y agoWho cares how long it takes to empty the trash? It solves the problem of freeing the name and removing it from view of the user instantly. Your solution wouldn't make emptying the trash any faster.
- maxxxxx 9y agoEmptying the trash slows down the machine a lot so other processes are suffering.
- ams6110 9y agoAnything in windows seems to have the potential to slow down the machine a lot. I'm not sure why that is but process priorities don't seem to be well implemented. Turning off Windows Defender makes Windows Update run much faster.
- maxxxxx 9y agoI remember somebody at Microsoft explained the trash in Windows to me in a similar way. The problem is that from observation it doesn;t seem to work that way....
- canes123456 9y agoI needed to delete 70GB and 100,000s files across 10 machines last week. It took an hour using the command method on each machine. Using the GUI froze windows and even if it worked would take at least a day.
- 43224gg252 9y agoLinux use to have a very similar problem but it was finally fixed in kernel 4.10. Surprised windows suffers from the same thing and now it's got me wondering if MacOS does this too...
- maxxxxx 9y agoMacOS is much faster than windows for similar operations
- lordlimecat 9y agoSuch a broad and unqualified statement is not plausible and reeks of fanboyism.
- maxxxxx 9y agoMaybe I wasn't clear enough and should have qualified. What I meant was similar operations like the ones this thread is about: - Putting stuff into trash - Emptying trash - Deleting large number of files with command line From my experience MacOS is much faster for any of these. Add copying files to external hard disk or SD card to that list. My statement was not meant to be about the overall performance of MacOS vs Windows.
- tracker1 9y agoI find that the filesystem of choice has some strong influences on that. I usually install `rimraf` via npm, which does about the same as `rm -rf` but works everywhere node does.
- 9y ago
- pjc50 9y agoHowever, on some systems I've seen the delete performance wedge the disk. I'm going to blame cheap SSDs for this; you could watch it delete the first few thousand files, and then requests on that drive slowed to a crawl. Including other file creates and writes. I suspect this was due to syncing each delete change, which incurs a rewrite of a whole Flash block. After a short while the drive runs out of prepared blank Flash and has to start slowly erasing some more. And that's using rmdir.
- stuaxo 9y agoWedge the disk is exactly what this should be called.