http://bugs.winehq.org/show_bug.cgi?id=35530
Bug ID: 35530 Summary: fjords is very slow because of GetLocaleInfoW checking registry Product: Wine Version: 1.7.11 Hardware: x86 URL: http://moonmagic.itch.io/fjords OS: Linux Status: NEW Keywords: performance Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: madewokherd@gmail.com Classification: Unclassified
Created attachment 47442 --> http://bugs.winehq.org/attachment.cgi?id=47442 hack to skip registry check
Fjords runs very slowly. I found that about half of the cpu time is spent in wineserver, and a +server log led me to registry checks in GetLocaleInfoW. I found that hacking out those checks (as in the attached patch) made the game playable.
I don't know how this can be solved. I don't think caching is an option, as these registry values could presumably be updated at any time.
This may be a duplicate of bug 33335, but I'll need Scott Ritchie to verify that.
http://bugs.winehq.org/show_bug.cgi?id=35530
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=35530
--- Comment #1 from Vincent Povirk madewokherd@gmail.com --- Created attachment 47443 --> http://bugs.winehq.org/attachment.cgi?id=47443 hack to cache registry key handle
Hacking get_registry_locale_info to only create the HKEY once seems to be enough to make the game playable.
It's still not a proper solution, but it suggests to me that reducing this to one server call should be good enough. However, a server call still requires a valid HKEY, and root keys like HKEY_CURRENT_USER don't count (they are implemented by advapi32, which I assume we can't use from inside kernel32).
Still, there are opportunities to reduce the number of server calls, and maybe this doesn't need to be reduced to only one call.
http://bugs.winehq.org/show_bug.cgi?id=35530
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #47443|0 |1 is obsolete| |
--- Comment #2 from Vincent Povirk madewokherd@gmail.com --- Comment on attachment 47443 --> http://bugs.winehq.org/attachment.cgi?id=47443 hack to cache registry key handle
Turns out 1 server call is too many when waterfalls are enabled.
http://bugs.winehq.org/show_bug.cgi?id=35530
rmlipman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rmlipman@gmail.com
--- Comment #3 from rmlipman@gmail.com --- This may also affect Risk of Rain. I filed a similar bug but I'm not exactly sure if they're duplicates
http://bugs.winehq.org/show_bug.cgi?id=35633
http://bugs.winehq.org/show_bug.cgi?id=35530
--- Comment #4 from Vincent Povirk madewokherd@gmail.com --- Looks like the same bug to me, although the patch on that bug appears to be a broken equivalent to attachment 47443, which isn't good enough for Fjords. So apparently, the problem is less severe in Risk of Rain.
http://bugs.winehq.org/show_bug.cgi?id=35530
--- Comment #5 from rmlipman@gmail.com --- (for Risk of Rain)
I tried applying patch 47442 and it got me up to about 40 fps on low settings. It still has performance issues because the game was designed to run at 60 fps.
http://bugs.winehq.org/show_bug.cgi?id=35530
--- Comment #6 from Vincent Povirk madewokherd@gmail.com --- I was told caching in process could be an acceptable approach, so I sent this patch: http://www.winehq.org/pipermail/wine-patches/2014-February/130766.html
http://bugs.winehq.org/show_bug.cgi?id=35530
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |49f3b4282d29890fe3c213d0965 | |71af4de2c45cd Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Vincent Povirk madewokherd@gmail.com --- I can't detect any timing difference in Fjords gameplay from Windows in a side-by-side comparison, so I'm going to say this is fixed. Terminals in Fjords are a little slower, but I think this is acceptable.
You should probably keep the Risk of Rain bug open if it's not at 60 fps currently. My guess is it has another unrelated problem that still needs addressed.
https://bugs.winehq.org/show_bug.cgi?id=35530
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.15.
https://bugs.winehq.org/show_bug.cgi?id=35530
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |scott@open-vote.org
--- Comment #9 from Anastasius Focht focht@gmx.net --- *** Bug 33335 has been marked as a duplicate of this bug. ***