TC 10 x64 Interface slowdown in dark mode

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Infector
Junior Member
Junior Member
Posts: 45
Joined: 2005-11-22, 12:48 UTC
Location: Russia

TC 10 x64 Interface slowdown in dark mode

Post by *Infector »

In TC 10 I faced with strange behavior
TC deleting files extremely slow.
I take some measures:

5GB - 248 files

TC10
Deleting from hhd\ssd in foreground ~ 2m
Deleting from hhd\ssd in background ~ 3sec

TC9
Deleting from hhd\ssd in foreground ~ 6sec

There are illustration how TC deleting files in foreground and background
Image: https://tinypic.host/images/2022/01/23/slow-delete-w11.gif

Reproduced with 100% result.

I use the default settings for copy\delete operations
Image: https://tinypic.host/images/2022/01/23/image.png
Last edited by Infector on 2022-01-27, 16:48 UTC, edited 3 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 10 x64 Slowly deleting files

Post by *ghisler(Author) »

Some third party program must be interfering with the delete process. Please try the Explorer delete method.
Author of Total Commander
https://www.ghisler.com
Infector
Junior Member
Junior Member
Posts: 45
Joined: 2005-11-22, 12:48 UTC
Location: Russia

Re: TC 10 x64 Slowly deleting files

Post by *Infector »

Huh, it took me half a day to find the problem.

I don't use any third party plugins with TC, but I tried Explorer delete method and it works pretty fast, like TC in background mode ~2-3 sec to delete all files.

To ensure the problem somewhere inside TC I deleted wincmd.ini to try it clean and I got a speed of ~2-3 sec to delete all files.

Then I started playing around with different options and I got this!

White mode ~ 3sec
White mode with disabled option calculate space before copy\delete ~ 5sec

Use black mode ~ 20sec
Use black mode with disabled option calculate space before copy\delete ~ 40sec

I then restored wincmd.ini and got the old slow behavior again.

Switching to White mode and enabling calculate space before copy\delete returned default behavior ~3sec to delete files
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC 10 x64 Slowly deleting files

Post by *Hacker »

Infector,
That is very strange.

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
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 10 x64 Slowly deleting files

Post by *petermad »

Hacker wrote: 2022-01-26, 11:11 UTC Infector,
That is very strange.

Roman
Indeed very strange that Dark mode should have any influence on the file operations :shock:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Infector
Junior Member
Junior Member
Posts: 45
Joined: 2005-11-22, 12:48 UTC
Location: Russia

Re: TC 10 x64 Slowly deleting files

Post by *Infector »

Hacker,
yes, but it's true. I checked twice with stopwatch :shock:.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC 10 x64 Slowly deleting files

Post by *Hacker »

petermad,
My guess would be that it's not the file operations that are slow but the updating of the panel (or some other part of the GUI). It is also my experience that deleting lots of files in the foreground is slower than in the background but I have never suspected dark mode.

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.
Infector
Junior Member
Junior Member
Posts: 45
Joined: 2005-11-22, 12:48 UTC
Location: Russia

Re: TC 10 x64 Slowly deleting files

Post by *Infector »

User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC 10 x64 Slowly deleting files

Post by *petermad »

2Infector

Impressive difference - is it also like that if you are using Full View (Ctrl+F2) instead of Brief View.

Hint - you can switch between Dark and Normal mode directly from the Configuration menu, you don't have to open the Configuration dialog for that.

EDIT: I have now tested it with a setup as you described, and I can confirm that there is a considerable difference in the speed when using Dark mode, and even more considerable if I disable calculating of space before copying/deleting.

It also seems to be a little slower i Brief mode, but I haven't thoroughly tested that.

Tested with TC 10.00 x64 under Windows 10 21H2 and Windows 7

EDIT 2:
I have now also tested with TC 10.00 32bit, and here there is almost no difference in speed between Dark and Normal mode.

I can also add, that if I instead of marking and deleting all files in the directory instead go up one dir and delete the dir and its content itself, then the speed is normal in Dark mode also with 64bit TC.

Instead of deleting *.jpg files I also tried with 0-byte txt files, and it is the same problem.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Infector
Junior Member
Junior Member
Posts: 45
Joined: 2005-11-22, 12:48 UTC
Location: Russia

Re: TC 10 x64 Slowly deleting files in dark mode

Post by *Infector »

I just noticed that the Options window opens for 4 seconds in dark mode and about 20 ms in white mode. So the slowdown is a common problem in dark mode.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 10 x64 Interface slowdown in dark mode

Post by *ghisler(Author) »

I found the problem with deleting! In dark mode, TC 64-bit was re-drawing all listbox items instead of just the changed one! This was done because the Lazarus library sent an uninitialized PAINTSTRUCT to the paint function in some cases. After fixing this, the delete function is as fast as in normal mode or in the 32-bit verison. It's not a big problem when using "Full" view with all file details, so I never noticed it myself. If you have this problem, you may consider using the 32-bit version.
I just noticed that the Options window opens for 4 seconds in dark mode and about 20 ms in white mode. So the slowdown is a common problem in dark mode.
I have made some speed measurements - on my slowest PC (a laptop with Core i5-3317U two core) it takes about 1.5 seconds longer in dark mode. The difference mainly comes from the calls to SetWindowTheme(handle,"DarkMode_Explorer",null) needed for the following controls:
- listboxes
- comboboxes (dropdown part)
- scrollbars (mainly used as spinners to change numbers)
- edit boxes with scollbars
to make the scrollbar dark too.

However, I found a way to make this faster: call it only when switching to a tab with such controls. I will use this in the next version.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC 10 x64 Interface slowdown in dark mode

Post by *Hacker »

Christian,
Great, thank you! Did you please check if the same problem exists with other functions which update the file list? Copy, Move, etc.?

TIA
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: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 10 x64 Interface slowdown in dark mode

Post by *ghisler(Author) »

Great, thank you! Did you please check if the same problem exists with other functions which update the file list? Copy, Move, etc.?
It doesn't matter because the error was not in the delete function but in the handling of WM_PAINT, WM_PRINTCLIENT and WM_ERASEBKGND. Therefore my fix will handle all similar situations.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC 10 x64 Interface slowdown in dark mode

Post by *Hacker »

Christian,
Ah, I see, thank you.

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
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: TC 10 x64 Interface slowdown in dark mode

Post by *nsp »

@ghisler(Author)
Christian, do you have any date for a bugfix version ?
Post Reply