Deleting thousands of files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
zrbite
New Member
New Member
Posts: 1
Joined: 2008-12-21, 12:55 UTC

Deleting thousands of files

Post by *zrbite »

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
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

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.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hello zrbite,
You can always search for delete cpu on the forums.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is a known Vista bug, there is no workaround.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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).
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

ghisler(Author) wrote:This is a known Vista bug, there is no workaround.
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?

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
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3869
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Temporarily disable the indexing service while bulk deleting
Stopping a service w/o administrative rights is really difficult on Vista ...
#5767 Personal license
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

Absolutely - it would have to be done as in "Run As Administrator" mode
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Elevate to accelerate :-D this is ridiculous!
Venkman
Junior Member
Junior Member
Posts: 18
Joined: 2009-01-07, 14:47 UTC

Post by *Venkman »

Huh?
samot
Junior Member
Junior Member
Posts: 56
Joined: 2003-02-21, 11:53 UTC
Location: Koblenz, Germany
Contact:

Post by *samot »

Did you try to delete the files by passing the recycle bin (Shift-F8 instead of F8 )?

Its usually very much faster and in the most cases the thousands file did not fit in the recycle bin so that the first deletet are removed from it, when the last ones are deleted.

best regards

Thomas
siealex
Senior Member
Senior Member
Posts: 278
Joined: 2009-03-22, 16:36 UTC

Post by *siealex »

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?
We are not so S.M.A.R.T. as we imagine...
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

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?
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)
If you think that drawing the progressbar is main reason for slowing down deletion process, you should try this setting.
Anyway, <Shift+Delete> is fast enough for me. :wink:

Regards
Holger
LDevil
New Member
New Member
Posts: 1
Joined: 2009-04-05, 15:44 UTC
Location: Poland

Post by *LDevil »

It's insane, TC has created over 400 threads and it consumes about 80% of CPU (Intel Q9550), and almost 1.5GB RAM!
Almost every thread is in state Wait:UserRequest with start address at: TpCallbackMayRunLong+0xfa.
Is there any way to delete many files using TC on Vista?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
Post Reply