https://bugs.winehq.org/show_bug.cgi?id=38779
Bug ID: 38779 Summary: Homeworld 2: unusually long loading time (with built-in msvcr70) Product: Wine Version: 1.7.17 Hardware: x86 URL: http://www.fileplanet.com/129916/120000/fileinfo/Homew orld-2---Demo OS: Linux Status: NEW Keywords: download, regression Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: piotr.caban@gmail.com Regression SHA1: 3a7bf4a34b82f1857f40f482890e148d7dd9e30a Distribution: ---
Homeworld 2 demo loads to the main menu in no time, but starting a single-player mission takes ~40 secs on my system. For comparison, loading the mission in the demo takes only ~5 secs with native msvcr70.dll. Reducing detail level doesn't affect loading times.
The demo comes bundled with it's own msvcp70,msvcr70 libraries, a workaround is to override msvcr70 to native.
The problem is present since
commit 3a7bf4a34b82f1857f40f482890e148d7dd9e30a Author: Piotr Caban piotr@codeweavers.com Date: Fri Apr 18 12:33:37 2014 +0200
msvcr70: Share the source code with msvcrt.
To reproduce the problem with the demo version: 1. install the demo, start the game with ../Bin/Release/Homeworld2.exe -nopbuffer (on my system the demo must be started with '-nopbuffer' option otherwise it crashes on start). 2. the game shows a couple of logos and loads to the main menu in no time. 3. start the only available single-player mission. It takes ~40 secs on my system to load the mission with built-in msvcr70.
wine-1.7.45-126-g6fe5546 Fedora 22 x86
https://bugs.winehq.org/show_bug.cgi?id=38779
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- I can reproduce the issue. The application calls setlocale function tons of times (it always uses the same locale).
https://bugs.winehq.org/show_bug.cgi?id=38779
--- Comment #2 from Piotr Caban piotr.caban@gmail.com --- I've sent a patch that improves setlocale speed little. Could you please give it a try?
(It was committed as e9eec98d5c74fb816ee4615d437aefb0d336de92). I'm still planning to optimize the function more when I have time.
https://bugs.winehq.org/show_bug.cgi?id=38779
--- Comment #3 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Piotr Caban from comment #2)
I've sent a patch that improves setlocale speed little. Could you please give it a try?
(It was committed as e9eec98d5c74fb816ee4615d437aefb0d336de92). I'm still planning to optimize the function more when I have time.
Yes, I noticed that your latest patch roughly halved the loading time in Homeworld 2 demo :) I think Homeworld: Remastered Collection on Steam has the same problem, although it doesn't make use of msvcr70 but msvcr110, loading times are much longer in the remastered edition than in the demo.
https://bugs.winehq.org/show_bug.cgi?id=38779
Linards linards.liepins@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |linards.liepins@gmail.com
--- Comment #4 from Linards linards.liepins@gmail.com --- (In reply to Béla Gyebrószki from comment #3)
(In reply to Piotr Caban from comment #2)
I've sent a patch that improves setlocale speed little. Could you please give it a try?
(It was committed as e9eec98d5c74fb816ee4615d437aefb0d336de92). I'm still planning to optimize the function more when I have time.
Yes, I noticed that your latest patch roughly halved the loading time in Homeworld 2 demo :) I think Homeworld: Remastered Collection on Steam has the same problem, although it doesn't make use of msvcr70 but msvcr110, loading times are much longer in the remastered edition than in the demo.
Hi, Bela.
Thank you for your time to test this and report back here.
It would also help a lot if it would be possible from your side to test this slow-down regression for Homeworld Remastered Collection on Clean 32-bit WINEPREFIX. If you find same behavior, please link this bug for Homeworld Remastered Collection also.
Thanks again.
https://bugs.winehq.org/show_bug.cgi?id=38779
--- Comment #5 from Béla Gyebrószki gyebro69@gmail.com ---
(In reply to Linards from comment #4) Hi, Bela.
Thank you for your time to test this and report back here.
It would also help a lot if it would be possible from your side to test this slow-down regression for Homeworld Remastered Collection on Clean 32-bit WINEPREFIX. If you find same behavior, please link this bug for Homeworld Remastered Collection also.
Thanks again.
It was only an assumption on my part that the long loading times in the original H2 game was the same that affects the newly released Remastered Collection as well. For example H1 Remastered took 5m 20s to get to the main menu and took almost 10 minutes to start the first mission. In recent Wine, thanks to Piotr's patches, those times are roughly halved and reduced to 2m 50s and 4m 50s. This is still way too much time compared to when native msvcr110 is used (10s and 25s). IMHO this bug can be linked against the Remastered Collection on Appdb.
@Appdb admins: 2 entries exist on Appdb for the Remastered Collection, they should be merged: https://appdb.winehq.org/objectManager.php?sClass=version&iId=31973 https://appdb.winehq.org/objectManager.php?sClass=version&iId=31982
https://bugs.winehq.org/show_bug.cgi?id=38779
--- Comment #6 from Piotr Caban piotr.caban@gmail.com --- It should be fixed. Please retest.
https://bugs.winehq.org/show_bug.cgi?id=38779
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f9bae3e5a27c56a02378cd1348d | |bb1cea57b5dc5 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Piotr Caban from comment #6)
It should be fixed. Please retest.
Your recent series of msvcrt patches fixed the problem in the original Homeworld 2 and in the Remastered Collection as well, thank you.
https://bugs.winehq.org/show_bug.cgi?id=38779
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.52.