Slowness in dialog creation in TC over time

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Slowness in dialog creation in TC over time

Post by *aviasd »

Hi,
I'm trying to troubleshoot some weird issues related to TC.
Recently upgraded to windows 10 2004 19041 (x64) from Win7
After a certain time elapse from boot TC starts becoming very slow in opening file/copy dialogs, search, preferences, or actually anything involving creating a new window. - Instead of being instantaneous, it takes about 1-2 seconds to open.
This behavior is exhibited on both 64 and 32 bit versions as well as on a clean wincmd.ini.
usually, a logoff fixes the problem.
Tried closing a program one by one to see if it has any effects, usually after closing some apps that hook to window creation diminishes the issue ( e.g AutoHotkey, powerpro, strokeit) but it never used to be the case on win7.

This issue is exhibited only on TC, not on other apps that open dialogs/extra windows.

P.S I don't have any DPI scaling applied on this system.

Can someone please point to a lead on this ??
thanks
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Re: Slowness in dialog creation in TC over time

Post by *aviasd »

Update: After further checking it seems like Display fusion is the app causing the most lag.
After disabling all system hooks in that app, Tc seems to be working normally, although it seems odd that only TC is affected by this..
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Slowness in dialog creation in TC over time

Post by *ghisler(Author) »

Maybe you can report it to them? If they blame Total Commander, please ask them what I would have to change to avoid the problem.
Author of Total Commander
https://www.ghisler.com
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Re: Slowness in dialog creation in TC over time

Post by *aviasd »

Well, The issue isn't solved.
After disabling Display Fusion I've noticed that other apps affect total commander's performance - For example, if I close Visual Studio 2017, it improves window creation.

I've been tearing my hair with this problem.
I've written a small ahk script to test window creation:
The script switch to TC, marks time, sends a hotkey to open configuration then marks time again when the window is open.
  • On a Windows 7 machine ( Clean ) - Tick count: 281
    On a Windows 10 machine ( Clean ) - Tick count: 781
    On my machine ( With nothing but TC and chrome ) - Tick count: 1118
    On my machine ( With my normal set of apps from Win 7 ) - Tick count: 1828
    On my machine ( With my normal set of apps from Win 7 + Vs2017 ) - Tick count: varies between 2000-3900
It seems Windows 10 is managing window creation differently than Win 7, TC is affected mostly than other apps - Perhaps someone could shed some light on how TC is creating windows - Maybe that would help locate the issue.

I have no idea what's the difference between a clean Win 10 and my machine, guessing it's some windows config difference, but I have no desire to reinstall my machine again so if anyone has an idea on how to troubleshoot this, please HELP!! :cry:

I was thinking about walking through stack traces of TC in process explorer but the issue might not be even there - Maybe some other process is hijacking window creation.

Here's the script if anyone needs to validate/test how it works in his own machine:

* To view timing info, Dbgview needs to be open.

* The ticks are also displayed in a toast message.

* In TC: Ctrl+, needs to be assigned to cm_Config.

Code: Select all

#j::TestTot()

TestTot() {
  prev:=WinActive("A")
  winactivate,ahk_class TTOTAL_CMD
  send,^,
  StartTime := A_TickCount
  outputdebug, % A_Min  ":"  a_sec "."   a_msec "- start"

  winwaitactive,ahk_class TDLGCONFIGALL

  outputdebug, % A_Min  ":"  a_sec "."   a_msec "- end"
  
  diff:=A_TickCount - StartTime
  outputdebug,% "Tickcount: " diff
  traytip,Debug Tot,% "Tickcount: " diff,2

  send,{Escape}
  WinActivate, ahk_id %prev%

}


What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Re: Slowness in dialog creation in TC over time

Post by *aviasd »

Update:

A few more stats:
On my machine ( After logoff/logon With nothing but TC and chrome ) - Tick count: 812 - Same as on a clean machine.
On my machine ( After logoff/logon With My normal set of apps ) - Tick count: Avg 1320.

I then proceeded with the following:

Killing my normal set of apps one by one and running the ahk script at each iteration:

besides a few that were difficult to measure differences, these apps affected loading speed the most:
Display fusion (Even with hooks disabled) - 100 ms
FindAndRunRobot - 100ms
Process explorer - 100ms
Strokeit ~30-50ms


After removing those, I came back to the initial clean logon state of ~875 ms.
But it's not a good solution since I use those regularly...

I'm still waiting for the real slowness to come in so I can measure accurately with this method, usually takes a day or two.

Also, It would be good if Ghistler could figure out why is there such a big difference between Win7 And Win10... TC was so much snappier back in the good old days...
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Re: Slowness in dialog creation in TC over time

Post by *aviasd »

If someone needs the process killing script, here it is (PowerShell)
You'll also need pstools

Code: Select all


function Debug-Processes {
  param($PauseAfter=1)

  $list=@("aText",
      "AutoHotkey",
      "brave",
      "DisplayFusion",
      "Ditto",
      "Everything",
      "FindAndRunRobot",
      "googledrivesync",
      "gvim",
      "Plex",
      "powerpro",
      "ppro64",
      "ProcessHacker",
      "procexp",
      "SearchApp",
      "ShareX",
      "strokeit",
      "TOTALCMD",
      "TrayIndicators 1.1",
      "volumouse",
      "WindowPad",
      "ConEmu")

      $current=0
      $list | % { 
        $current++
        "Killing $_"
        if ($current -eq $PauseAfter) {
          $current=0
          $ans = read-host "Press enter to continue,S to skip"
          if ($ans -match "S") {
            "Skipped $_"
            return
          } 
          ppsk $_
        }
      }
}

function ppsk {
  param($app)

  $list= pslist 2>(out-null)| % { $_.split(' ')[0] } | select -skip 10 |  where { $_ -match $app } | select -unique
  if (!($list)) { 
    Write-Warning "No targets found,Attempting command based" ; 
    #psk2.ps1 $app
    #Seperate script - commented
    return
  }

  write-host "Targets:" 
  $list
  write-host "--------" 
  $list | % { 
    write-host "Killing $_"
    pskill $_ 2>(out-null)
  }

}

What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

Re: Slowness in dialog creation in TC over time

Post by *aviasd »

This is interesting:
Tried the 64Bit version of TC: tick count is 188 with all apps open, So here's a direction, the question is why.
I'm still using the 32bit TC because of plugin support and portability... Maybe forced now to switch...
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
Post Reply