https://bugs.winehq.org/show_bug.cgi?id=47431
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |4.11 CC| |focht@gmx.net Summary|Steam and wineserver too |Multiple applications and |high CPU usage |games show too high CPU | |usage and UI slowness/lag | |with | |wine-4.11-84-g074abfe097 | |(EnumDisplayMonitors | |implementation uses | |expensive registry | |accesses)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming. It affects the performance of various apps. In one case, 'Total Commander' (https://www.ghisler.com/) it adds over 20 seconds to the startup until the main user-interface is shown. Also during runtime there is noticeable lag.
--- snip --- $ WINEDEBUG=+seh,+loaddll,+timestamp,+relay,+x11drv,+system wine64 TOTALCMD64.EXE /i="c:\totalcmd\wincmd.ini" /F="c:\totalcmd\wcx_ftp.ini"
log.txt 2>&1
... 1144.903:0071:Call user32.GetClientRect(000202de,01cca2b0) ret=00887a51 1144.903:0071:Ret user32.GetClientRect() retval=00000001 ret=00887a51 1144.903:0071:Call user32.GetPropA(000202de,0000c03c) ret=0092d25c 1144.903:0071:Ret user32.GetPropA() retval=01d1afa0 ret=0092d25c 1144.903:0071:Call user32.GetWindowPlacement(000202de,01cca118) ret=0088912f 1144.903:0071:Ret user32.GetWindowPlacement() retval=00000001 ret=0088912f 1144.903:0071:Call user32.GetWindowRect(000202de,01cca108) ret=0088917a 1144.903:0071:Ret user32.GetWindowRect() retval=00000001 ret=0088917a 1144.903:0071:Call user32.MonitorFromRect(01cc9f98,00000002) ret=0093d293 1144.903:0071:trace:system:nulldrv_EnumDisplayMonitors ((nil), (nil), 0x7f8456d7cc00, 0x1cc9d80) 1144.903:0071:Call setupapi.SetupDiGetClassDevsW(7f8456dc0f20,00000000,00000000,00000000) ret=7f8456d7eac8 1144.903:0071:Call ntdll.RtlAllocateHeap(00010000,00000000,00000030) ret=7f84546075af 1144.903:0071:Ret ntdll.RtlAllocateHeap() retval=01dd8d80 ret=7f84546075af 1144.903:0071:Call advapi32.RegCreateKeyExW(ffffffff80000002,7f845464ad80 L"System\CurrentControlSet\Enum",00000000,00000000,00000000,00020019,00000000,01cc95f0,00000000) ret=7f845460609c ... 1144.903:0071:Ret advapi32.RegCreateKeyExW() retval=00000000 ret=7f845460609c 1144.903:0071:Call advapi32.RegEnumKeyExW(000270dc,00000000,01cc9600,01cc95ec,00000000,00000000,00000000,00000000) ret=7f8454606149 ... 1144.903:0071:Ret advapi32.RegEnumKeyExW() retval=00000000 ret=7f8454606149 1144.903:0071:Call advapi32.RegOpenKeyExW(000270dc,01cc9600 L"DISPLAY",00000000,00020019,01cc95f8) ret=7f8454606173 ... 1144.904:0071:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=7f8454606173 1144.904:0071:Call advapi32.RegEnumKeyExW(000270e0,00000000,01cc9170,01cc8f64,00000000,00000000,00000000,00000000) ret=7f84546054c9 ... 1144.904:0071:Call advapi32.RegCreateKeyExW(ffffffff80000002,7f845464ad80 L"System\CurrentControlSet\Enum",00000000,00000000,00000000,000f003f,00000000,01cc8d78,00000000) ret=7f8454604ea1 ... 1144.904:0071:Ret advapi32.RegCreateKeyExW() retval=00000000 ret=7f8454604ea1 1144.904:0071:Call advapi32.RegCreateKeyExW(000270f4,0011f4f0 L"DISPLAY\DEFAULT_MONITOR\0000&0000",00000000,00000000,00000000,0002001f,00000000,01cc8d80,00000000) ret=7f8454605313 ... 1144.904:0071:Call advapi32.RegSetValueExW(000270fc,7f845464af80 L"ClassGUID",00000000,00000001,01cc8d80,0000004e) ret=7f84546030b7 ... 1144.905:0071:Ret setupapi.SetupDiGetClassDevsW() retval=01dd8d80 ret=7f8456d7eac8 1144.905:0071:Call setupapi.SetupDiEnumDeviceInfo(01dd8d80,00000000,01cc9c50) ret=7f8456d7eba2 1144.905:0071:Ret setupapi.SetupDiEnumDeviceInfo() retval=00000001 ret=7f8456d7eba2 1144.905:0071:Call setupapi.SetupDiGetDevicePropertyW(01dd8d80,01cc9c50,7f8456dbf770,01cc9c20,01cc9c1c,00000004,00000000,00000000) ret=7f8456d7eb23 ... 1144.905:0071:Ret advapi32.RegQueryValueExW() retval=00000000 ret=7f84546112ee 1144.905:0071:Ret setupapi.SetupDiGetDevicePropertyW() retval=00000001 ret=7f8456d7eb66 1144.905:0071:trace:system:nulldrv_GetMonitorInfo (0x1, 0x1cc9a50) 1144.905:0071:Call setupapi.SetupDiGetClassDevsW(7f8456dc0f20,00000000,00000000,00000000) ret=7f8456d7e1fa ... 1144.908:0071:Ret setupapi.SetupDiDestroyDeviceInfoList() retval=00000001 ret=7f8456d7ebb2 1144.908:0071:trace:system:MonitorFromRect (1031,245)-(1464,265) flags 2 returning 0x1 1144.908:0071:Ret user32.MonitorFromRect() retval=00000001 ret=0093d293 ... --- snip ---
All these registry accesses hurt the app performance a lot when specific user32 API is called very often, such as 'user32.MonitorFromRect()'.
https://web.archive.org/web/20190412204700/https://totalcommander.ch/win/tcm...
$ sha1sum tcmd922ax64.exe 0434912ab8ec1ac38aa7c2d00a06ba8e5f843c8f tcmd922ax64.exe
$ du -sh tcmd922ax64.exe 5.0M tcmd922ax64.exe
$ wine-4.11-192-g90a1e5d943
Regards