Borderline unusable performance degradation

Please report only one bug per message!

Moderators: Stefan2, white, Hacker

Suslik
Junior Member
Junior Member
Posts: 11
Joined: 2021-08-10, 10:55 UTC

Borderline unusable performance degradation

Post by *Suslik »

Something is definitely going wrong with TC's UI. I have a very high end system at home and decent one at work, both are windows 10-based, run off SSD's and have 32+GB of ram. All menus in TC take much longer to render than you'd expect. For example, f5 menu takes 2 seconds to show up and then 2 more seconds to render its contents. You can literally see how windows controls appear one by one. System is idle, other programs render snappily.

In the "options" every section takes 2-4 seconds to show up. Curiously lister shows almost instantaneously, as it always had.

The greatest offender is still alt+f7 menu: it takes literally 8+ seconds every time I open it. It's 100% reproducible and happens every time, I can record a video if needed.

This problem started around windows 10 release if I remember correctly. At first it manifested as slow alt+f7 menu initial opening (getting faster on consequent requests), but now I feel like every single menu is ~10x slower than what I'd expect from TC and alt+f7 specifically is a torture to open every time. Electron-based apps run literally dozens of times faster than native TC, something is really wrong here.

Happens on a fresh TC installation with the default config (i'm using the x64 download). I'm not using any 3rd party antivirus software, turning off microsoft's defender seems to have no effect.

I am willing to run any tests needed, profile, run debug builds, send logs -- anything to help debug this problem, because I've been using TC for 10+ years and I'm not giving it up like this.

Also a question for any visitors of this thread: how long does it take you to open alt+f7 menu?
Last edited by Suslik on 2023-01-23, 14:37 UTC, edited 2 times in total.
User avatar
Hacker
Moderator
Moderator
Posts: 12643
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Borderline unusable performance degradation

Post by *Hacker »

Suslik,
<1s for search in a separate process. Using the built-in MS Defender as AV software.

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.
Suslik
Junior Member
Junior Member
Posts: 11
Joined: 2021-08-10, 10:55 UTC

Re: Borderline unusable performance degradation

Post by *Suslik »

Using alt+shift+f7 to open search in a separate process does work much faster for me, but still is far too slow. It takes around 4-5s.

I'm honestly suspecting that microsoft is deliberately making GDI apps slower to make their new ui frameworks look more compelling. I think so because other GDI apps seem to render much slower than metro apps. By "slower" I mean process explorer opens its settings in 1 second (nowhere near as slow as TC, but still slower than you'd expect) when metro apps are instantaneous.
Last edited by Suslik on 2023-01-23, 14:47 UTC, edited 1 time in total.
User avatar
Dalai
Power Member
Power Member
Posts: 8415
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Borderline unusable performance degradation

Post by *Dalai »

The issue you describe has come up quite a few times over the last couple of months. I've never seen such issue on any system, but I rarely use TC 64-bit, so that's hardly any indication nor representative.

Please specify the exact environment you're using, Windows version, TC version and if you use TC dark or normal mode. You should also try with a clean wincmd.ini, like this:

Code: Select all

totalcmd64.exe /i="%TEMP%\fresh.ini"
Maybe also try in Windows Safe Mode, just to see if that makes any difference.

Please also try the 32-bit version of TC. It's compiled by a different compiler (32-bit is compiled with Delphi, 64-bit with Lazarus/Free Pascal). Maybe it's some bug in the visual libraries used by these development environments.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 12315
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Borderline unusable performance degradation

Post by *petermad »

2Dalai
You should also try with a clean wincmd.ini, like this:
Suslik apparently already did that:
Happens on a fresh TC installation with the default config
But if he didn't delete his wincmd.ini file before making a "fresh TC installation", then the old wincmd.ini might still be used - so using totalcmd64.exe /i="%TEMP%\fresh.ini" is definitely a good approach to be sure that a fresh ini file is used.
Last edited by petermad on 2023-01-23, 15:00 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Suslik
Junior Member
Junior Member
Posts: 11
Joined: 2021-08-10, 10:55 UTC

Re: Borderline unusable performance degradation

Post by *Suslik »

The issue is definitely not new as I've been experiencing it for the past couple years regularly updating windows and TC, and it seems to get worse over time (subjectively). I am testing with a fresh config by renaming my config to a different one (tested on a fresh windows install a couple years ago too, same behaviour), windows 10 pro.

However, 32-bit version does work much faster than the 64-bit one. Alt+f7 opens in about 5 seconds on x86, but Alt+shift+f7 opens in about a 1-2 seconds which is much closer to what I'd expect. But why is opening the search window in the same process so much slower than firing up a separate process? Should it not be the other way round?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 44426
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Borderline unusable performance degradation

Post by *ghisler(Author) »

Some people have reported slow loading of the search dialog when they had a lot of history entries in the "Search for", "Search in" and "Search text" fields, or lots of installed content plugins. All of these require reading from wincmd.ini, and some stupid antivirus software scans that file on every single access (although ini files don't contain any executable code). But it shouldn't be slow then when using a fresh ini.

It may help to add the wincmd.ini to the exclude list of your antivirus software to make it faster.

If not, you can try Microsoft's "process monitor" to find out what's happening during these 8 seconds:
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

You need to define a filter like this:
Process Name - contains - totalcmd - Include
32-bit version does work much faster than the 64-bit one
Then it may be a shell extension only available in 64-bit.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 8415
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Borderline unusable performance degradation

Post by *Dalai »

Suslik wrote: 2023-01-23, 14:59 UTCI am testing with a fresh config by renaming my config to a different one
Do you close TC after renaming the file? If so, TC will flush most of the currently used (old) config to the old file. Or in other words, the configuration is not completely stock. You should use the /i switch instead.
However, 32-bit version does work much faster than the 64-bit one. Alt+f7 opens in about 5 seconds on x86, but Alt+shift+f7 opens in about a 1-2 seconds which is much closer to what I'd expect.
But this is still much too slow! The dialogs should open in one second, tops, usually much less than a second.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 12315
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Borderline unusable performance degradation

Post by *petermad »

2Suslik

I have an extremely slow laptop with Windows 10 (solely for testing) and on that PC the search dialog shows up in less than 2 seconds.
On my Windows 7 Desktop PC the Search dialog shows up instantaneously.

Both computers are running Microsofts Defender Antivirus.

You write tha you have the same problem on both your private and your work computer - do you use the same TC settings on both computers?
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Suslik
Junior Member
Junior Member
Posts: 11
Joined: 2021-08-10, 10:55 UTC

Re: Borderline unusable performance degradation

Post by *Suslik »

I do use the same settings on my home machine as well as the work one. I also have a lot of similar software installed, so something can be interfering among things that I consider irrelevant.

Tried running TC with /i key -- it seems to run noticeably faster, but still far too slow (5 seconds to open alt+f7). Just as a data point, double commander is built with lazarus and renders ~10x faster than TC. Honestly it still render slower than what I'd expect, but this goes back to my conspiracy theory that microsoft is deliberately slowing down GDI programs, but that can't realistically explain 5+ seconds dialog loading time.

Tried adding TC folder (I store my config there) to defender's exclusion list, no change.

I have already run process monitor when reported the problem a year ago or so, it seems to have gotten much worse now:
https://i.imgur.com/S5QI4d6.png
The log starts when I press alt+f7 and by the end of the page the window still has not showed up.

Note that in my previous report viewtopic.php?p=404664 the problem seemed to randomly rectify itself from time to time, now it just reproduces all the time and seems to have gotten much worse.

I guess an unusual aspect of my workflow -- I very rarely restart my machines, their uptime is usually months and I only restart them to update windows. So something can be building up because of this? But again, only gdi programs seem to be affected and total commander specifically is affected much much more than every other gdi program.

UPD: uploaded a new process monitor image
Last edited by Suslik on 2023-01-23, 15:42 UTC, edited 1 time in total.
Suslik
Junior Member
Junior Member
Posts: 11
Joined: 2021-08-10, 10:55 UTC

Re: Borderline unusable performance degradation

Post by *Suslik »

If you have a look at the process monitor results, it literally means that opening wincmd.ini takes 4 seconds at first and then it proceeds reading it at the speed of 30 queries/second. Is it possible to avoid opening it every time and instead keep it in memory and flush every minute or so?
User avatar
petermad
Power Member
Power Member
Posts: 12315
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Borderline unusable performance degradation

Post by *petermad »

I made a couple of videos:
https://madsenworld.dk/tcmd/FindFilesW7.mp4
https://madsenworld.dk/tcmd/FindFilesW10.mp4

Windows 10 PC: 1.70 GHz AMD E2-1800 (8 GB RAM) from 2013
Windows 7 PC: 3.60 GHz Intel i7-4790 (14 GB RAM) from 2015

So two pretty old computers.

I just tested on my wifes Windows 7 computer, she has about 40 open Chrome windows at all time (so many that memory swapping takes place) - here the Find Files dialog also opens in a split second.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 12643
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Borderline unusable performance degradation

Post by *Hacker »

Suslik,
I very rarely restart my machines, their uptime is usually months and I only restart them to update windows. So something can be building up because of this?
Well, the obvious suggestion would be to try and see if the problems persists after a restart.

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.
CoolWater
Power Member
Power Member
Posts: 709
Joined: 2003-03-27, 16:33 UTC

Re: Borderline unusable performance degradation

Post by *CoolWater »

@ghisler

Do you set WM_SETREDRAW to false for the comboxes before filling it? I've experienced a massive speed gain when filling comboboxes with lots of entries.
User avatar
Dalai
Power Member
Power Member
Posts: 8415
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Borderline unusable performance degradation

Post by *Dalai »

2CoolWater
My assumption is that TC's code makes calls to TComboBox.Items.BeginUpdate (TStrings.BeginUpdate) before changing the list's data and .EndUpdate when it's done. But that doesn't matter if the dialog is slow to open with a fresh wincmd.ini (i.e. no history added whatsoever). It must be something else, probably related to graphics/drawing.

2Suslik
Do you have HVCI aka Memory Integrity enabled? This is known to slow the system down in certain situations. Check it in Windows Defender Security Center. More information about it, related settings and where to find it can be found in this article: https://www.howtogeek.com/357757/what-are-core-isolation-and-memory-integrity-in-windows-10/

And as I said: You could try Windows Safe Mode.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo - Download-Mirror
Post Reply