Remove-Empty-Directories icon indicating copy to clipboard operation
Remove-Empty-Directories copied to clipboard

Hog on Vista

Open russellpierce opened this issue 10 years ago • 5 comments

On my Windows Vista (x86) machine RED scans 15000 odd mixed content and empty folders just fine at first. During this time it uses a modest amount of the processor and grows in RAM at a reasonable rate. It grows to about 35 MB of RAM. Then I click 'Delete Folders'. RED starts deleting folders, but it also starts growing in RAM (it also makes hefty use of the processor for some reason). Eventually it eats through all the RAM it can and throws an out of memory error.

russellpierce avatar Aug 29 '14 23:08 russellpierce

I usually don't see an out of memory error, but often see it using 1.5+ GB RAM when deleting a lot of folders.

Walkman100 avatar Aug 29 '14 23:08 Walkman100

Also massive CPU usage here - all 4 Cores had 80% load (Intel i5)! And deletion was very slow - deleting a total of 140 files in over 3min. (Pause between each deletion set to 0; files on external USB-HDD; Win 7)

calohmn avatar May 10 '15 08:05 calohmn

Don't set it to 0, at least set it to 1 ms - a millisecond is hardly noticable to you, but it gives the CPU time (a millisecond) to pause. I have mine on 10 ms and folders still delete reasonably fast.

Walkman100 avatar May 10 '15 10:05 Walkman100

Ok I'm pretty sure I've figured out why it can be slow on some PC's (delay doesn't matter) - RED is trying to move the folders to the recycle bin. Set it to permanently delete them, and it's lightning fast (I got about 200+ folders deleted per second).

Walkman100 avatar May 10 '15 22:05 Walkman100

Hi guys, sorry for the late reply. Thanks for the research! Good to now that the "move to recycle bin" option can be the cause for a slow progress and a lot of wasted RAM. I'm currently working on a new version, maybe I can add a info or warning message for this case. Thanks again! :)

hxseven avatar Jun 07 '15 00:06 hxseven