Deleting thousands of files
Moderators: Hacker, petermad, Stefan2, white
Deleting thousands of files
Hi!
I've found a problem with deleting files. When I delete several thousands of files, the CPU usage goes to the sky, and there is a memory leak about 1 - 5 megabytes / second. (In the performance monitor both the CPU has 100% usage, on the processes monitor the process has a 30-50% CPU usage.) That means a few minutes after the start there will be a few hundred megabytes allocated! After canceling the deletion it continues to allocate memory and use the CPU for a few minutes, then in a few seconds the leak and CPU usage disappears. Like some kind of time-out.
Total Commander version: 7.04a
Delete options:
Use explorer delete method: false
F8/Del deletes to recycle bin: true
OS: Vista 32-bit
Memory: 4 GB (at least there are 3 GB available)
Processor: Core2 dual-core
User: standard user-level, UAC enabled
I've found a problem with deleting files. When I delete several thousands of files, the CPU usage goes to the sky, and there is a memory leak about 1 - 5 megabytes / second. (In the performance monitor both the CPU has 100% usage, on the processes monitor the process has a 30-50% CPU usage.) That means a few minutes after the start there will be a few hundred megabytes allocated! After canceling the deletion it continues to allocate memory and use the CPU for a few minutes, then in a few seconds the leak and CPU usage disappears. Like some kind of time-out.
Total Commander version: 7.04a
Delete options:
Use explorer delete method: false
F8/Del deletes to recycle bin: true
OS: Vista 32-bit
Memory: 4 GB (at least there are 3 GB available)
Processor: Core2 dual-core
User: standard user-level, UAC enabled
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
2zrbite
Please check does it also happen after these steps:
1. go to Configuration -> Operation
2. in "Calculate space occupied by subdirectories" group uncheck "before copying/deleting".
You can also try to hit Escape key once at the beginning of deleting process.
Please check does it also happen after these steps:
1. go to Configuration -> Operation
2. in "Calculate space occupied by subdirectories" group uncheck "before copying/deleting".
You can also try to hit Escape key once at the beginning of deleting process.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...
#128099
#128099
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is a known Vista bug, there is no workaround.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I have to say one thing which relates to topic name (not to first post contents). When we [re]move a large ammount, setting an label text may be longer than file removing. I think in that cases it is a good idea to set label text on each tenth file in selection for example (although this suggestion needs to be tested for performance difference).
Vista has this thing where it insists on indexing everything to search faster. Much more intrusively than the indexing on XP. Bloated Microsoft logic, but still, could it be that this index has to be updated for each individual file so this is what is taking so long?ghisler(Author) wrote:This is a known Vista bug, there is no workaround.
A workaround perhaps: Temporarily disable the indexing service while bulk deleting (I can look up the service name and .exe if it helps).
zrbite, could you test a delete in a Vista command prompt, if it is faster? Command prompt deletes are usually fast, while deleting in Windows Explorer is really slow on any Windows version. In this case, it could be useful for Ghisler to check out what routines are called for deletion in a command prompt as opposed to Explorer/TC
-V
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
siealex wrote:Drawing progressbars and writing text is MUCH LONGER than deleting even on XP! Is it possible to update the progressbar window each 10 seconds, but not on any file?
If you think that drawing the progressbar is main reason for slowing down deletion process, you should try this setting.F1: 4. Configuration and switches; b. INI-File settings: wincmd.ini wrote:NewStyleProgress= 1: Use operating system progress bar (default for Windows >=XP)
0: Use TC's own progress bar (default for all older Windows versions)
2: Like 1, but with a not segmented bar (only supported in classic theme)
Anyway, <Shift+Delete> is fast enough for me.

Regards
Holger
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC does NOT delete so many threads by itself. Maybe it's a bug in SHFileOperation creating one thread per call?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com