https://bugs.winehq.org/show_bug.cgi?id=49808
Bug ID: 49808 Summary: Regression in wine 4.0-rc1 cause Stellaris loads very slow, long time black screen Product: Wine Version: 4.0-rc1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: tim110011@163.com Distribution: ---
Stellaris on the recent wine version loads very slowly and the black screen takes a long time.
Tested many wine versions:
# 3.2 game loads very fast # 3.11 game loads very fast # 3.20-staging game loads very fast # 3.21 game loads very fast # 4.0-rc1 (for fedora28) game loads very slow, long time black screen # 4.0-rc1 (for fedora29) game loads very slow, long time black screen # 4.1 game loads very slow, long time black screen # 4.6 game loads very slow, long time black screen
Regression in 4.0-rc1 may affect many PDS Clausewitz engine games. Could it affect many games that load a lot of loose files?
CPU: Intel Xeon E3-1275L v3 Memory: 8GiB VGA: nVidia GeForce GTX 750 Ti Distro: Fedora 32 kernel: 5.8.6-201.fc32.x86_64
https://bugs.winehq.org/show_bug.cgi?id=49808
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #1 from joaopa jeremielapuree@yahoo.fr --- Please, run a regression test: https://wiki.winehq.org/Regression_Testing
https://bugs.winehq.org/show_bug.cgi?id=49808
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #2 from tim110011@163.com --- Running the bisection... failed. And my attempt to build wine-3.21 through normal method also failed. My connection to winehq is slow, add log as attachment failed twice, so i paste log here:
make[1]: Entering directory '/mnt/hdd/me/_wine_git/wine/build64/dlls/cryptui' gcc -m64 -c -o main.o ../../../dlls/cryptui/main.c -I. -I../../../dlls/cryptui -I../../include \ -I../../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wno-packed-not-aligned \ -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla \ -Wwrite-strings -Wpointer-arith -Wlogical-op -O2 ld: chain.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: collectionstore.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: context.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: crl.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: ctl.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: decode.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: encode.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: filestore.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: main.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: msg.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: object.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: oid.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: proplist.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: provstore.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: regstore.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: rootstore.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: serialize.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: sip.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: store.o:(.bss+0x20): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ld: str.o:(.bss+0x0): multiple definition of `hInstance'; cert.o:(.bss+0x0): first defined here ../../tools/winegcc/winegcc -o cryptdll.dll.fake -B../../tools/winebuild -m64 -fasynchronous-unwind-tables -shared ../../../dlls/cryptdll/cryptdll.spec \ cryptdll.o -ladvapi32 ../../libs/port/libwine_port.a make[1]: Leaving directory '/mnt/hdd/me/_wine_git/wine/build64/dlls/cryptdll' ../../tools/winegcc/winegcc -o cryptdlg.dll.fake -B../../tools/winebuild -m64 -fasynchronous-unwind-tables -shared ../../../dlls/cryptdlg/cryptdlg.spec \ main.o cryptdlg.res -lcryptui -lcrypt32 -lwintrust -luser32 -ladvapi32 \ ../../libs/port/libwine_port.a winebuild: ld failed with status 1 winegcc: ../../tools/winebuild/winebuild failed make[1]: *** [Makefile:623: crypt32.dll.so] Error 2 make[1]: Leaving directory '/mnt/hdd/me/_wine_git/wine/build64/dlls/crypt32' ../../tools/wrc/wrc -o cryptui.res -m64 --nostdinc -I. -I../../../dlls/cryptui -I../../include \ -I../../../include -D__WINESRC__ --po-dir=../../po ../../../dlls/cryptui/cryptui.rc make: *** [Makefile:8047: dlls/crypt32] Error 2
https://bugs.winehq.org/show_bug.cgi?id=49808
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- That's due to gcc 10.0's change in behaviour; you can work around it by appending "-fcommon" to CFLAGS and CROSSCFLAGS.
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #4 from tim110011@163.com --- afad5636cb3a49dff1e40054b47a8407629b3c01 is the first bad commit commit afad5636cb3a49dff1e40054b47a8407629b3c01 Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Fri Dec 7 00:33:26 2018 +0900
kernel32: Resolve an MUI time zone name.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
dlls/kernel32/time.c | 54 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 11 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=49808
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om Summary|Regression in wine 4.0-rc1 |Stellaris loads very slowly |cause Stellaris loads very | |slow, long time black | |screen | Keywords| |regression Component|-unknown |kernel32 Regression SHA1| |afad5636cb3a49dff1e40054b47 | |a8407629b3c01
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #5 from Sagawa sagawa.aki+winebugs@gmail.com --- Could you try Wine 4.10 and/or later? MUI string cache was introduced by commit b9b5117fe7 to mitigate loading issue.
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #6 from tim110011@163.com --- Dll override: d3dx9 d3dcompiler_43 d3dcompiler_47
Result: 3.21 load time: 1 min 36 sec 4.0-rc1 waited 5 minutes, doesn’t load, killed process 4.10 waited 5 minutes, doesn’t load, killed process 4.16 waited 5 minutes, doesn’t load, killed process
If I wait more time or get lucky, the game may load, but this time it doesn’t load at all.
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #7 from Sagawa sagawa.aki+winebugs@gmail.com --- Thanks for the information. Could you provide us WINEDEBUG=timestamp,msvcrt,reg log using Wine 4.10 or later? I'd like to know why the cache doesn't work effectively.
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #8 from tim110011@163.com --- Created attachment 68163 --> https://bugs.winehq.org/attachment.cgi?id=68163 wine4.10-log
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #9 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 68175 --> https://bugs.winehq.org/attachment.cgi?id=68175 cache localized time zone name
Thanks for the log. It shows a lot of GetTimeZoneInformation calls are done. At least, there're 5,547 calls in 8.8 seconds (630.3 calls/sec). I realized we needs much more performance.
Now, I prepare the proposed patch. Could you test the patch? It performs more than 50 times better than before! I hope this helps Stellaris issue.
[Background] I wrote down a benchmark test which calls GetTimeZoneInformation within 10 seconds. I ran the test on VirtualBox 6.1.14 with Intel Core i7-6600U processor.
The results are: Wine 3.x: 175,877.3 calls/sec Wine 4.0: 258.9 calls/sec Wine 5.17: 2,587.2 calls/sec
Indeed, Wine 4.0 was poor performance (sorry for that). Now, Wine 5.17 better than before, but it fairly slower than Wine 3.x.
At first, I doubted RegLoadMUIString implementation. I tested empty RegLoadMUIString implementation to get ideal record. However, it showed only 8921.3 calls/sec even ideal case. I changed my mind.
After that, I implemented localized time zone name cache inside the API. This is a bit ugly code. But, it marks 149186.9 calls/sec. That means over 50 times better performance compared with the current implementation.
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #10 from tim110011@163.com --- Thank you Sagawa, the patch works. The game loading speed is only a little slower than wine 3.21.
wine-5.17-patch 1st run, load time : 1min 43sec 2nd run, load time: 59sec after reboot, load time: 1min 10sec
wine-3.21 1st run, load time : 1min 36sec 2nd run, load time: 56sec after reboot, load time: 1min 5sec
https://bugs.winehq.org/show_bug.cgi?id=49808
--- Comment #11 from Sagawa sagawa.aki+winebugs@gmail.com --- Thanks for the report (again). My patch was committed today, i.e. https://source.winehq.org/git/wine.git/commit/d5edadf35a40cb7238c2068db28b6c... .
https://bugs.winehq.org/show_bug.cgi?id=49808
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |d5edadf35a40cb7238c2068db28 | |b6c6abc7da800 Status|UNCONFIRMED |RESOLVED
--- Comment #12 from Gijs Vermeulen gijsvrm@gmail.com --- Patch that user confirmed worked was committed, marking FIXED.
https://bugs.winehq.org/show_bug.cgi?id=49808
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.20.
https://bugs.winehq.org/show_bug.cgi?id=49808
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=49808
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #14 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.4.