[Bug 38879] New: wbemprox fill_videocontroller calls are expensive
https://bugs.winehq.org/show_bug.cgi?id=38879 Bug ID: 38879 Summary: wbemprox fill_videocontroller calls are expensive Product: Wine Version: 1.7.41 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wmi&wbemprox Assignee: wine-bugs(a)winehq.org Reporter: c10ud.dev(a)gmail.com Distribution: --- Created attachment 51812 --> https://bugs.winehq.org/attachment.cgi?id=51812 wbemprox: cache videocontroller queries Specifically League of Legends likes to continuously ask for video controller specs while in game (every 4 seconds or so). On my (old?) box this leads to a pretty big framedrop (~15fps when capped at 60) due to dxgi being initialized every time (and thus wined3d) by the fill_videocontroller function. The proposed solution caches results for subsequent calls, but I'm not sure about the implications (i.e. do we expect any of those fields to change in the lifespan of a wine application?) Comments welcome Greets -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 --- Comment #1 from Riccardo <c10ud.dev(a)gmail.com> --- Created attachment 51813 --> https://bugs.winehq.org/attachment.cgi?id=51813 sample log of a single call -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 Riccardo <c10ud.dev(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51812|0 |1 is obsolete| | --- Comment #2 from Riccardo <c10ud.dev(a)gmail.com> --- Created attachment 51814 --> https://bugs.winehq.org/attachment.cgi?id=51814 wbemprox: cache videocontroller queries -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 --- Comment #3 from Henri Verbeet <hverbeet(a)gmail.com> --- Note that in principle you can use IDXGIFactory1::IsCurrent() to check when you need to invalidate the cache. (Currently that always returns TRUE on Wine, but it would be the correct way to do this.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 --- Comment #4 from Riccardo <c10ud.dev(a)gmail.com> --- (In reply to Henri Verbeet from comment #3)
Note that in principle you can use IDXGIFactory1::IsCurrent() to check when you need to invalidate the cache. (Currently that always returns TRUE on Wine, but it would be the correct way to do this.)
Well, yes, but this would still mean we keep a dxgi instance around (with its wined3d etc.), right? So we could still keep the current code and skip only instancing as I think the expensive part is that one (I didn't measure it but..). I really don't think there's a _good_ way of solving this, maybe apps shouldn't just use wbemprox services for continuous querying.. (in this case the informations requested are really weird: ram, driver version and desc...???). Also I'm not sure if other apps follow the same pattern. Last note: I may have phrased the issue wrong, it's not really a frame drop, it's more of a ~100ms freeze (as you can see from logs). Riccardo -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 dj-max_payne(a)hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dj-max_payne(a)hotmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 Riccardo <c10ud.dev(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51813|0 |1 is obsolete| | Attachment #51814|0 |1 is obsolete| | --- Comment #5 from Riccardo <c10ud.dev(a)gmail.com> --- Created attachment 52616 --> https://bugs.winehq.org/attachment.cgi?id=52616 wbemprox: cache videocontroller queries (v2) This version of the patch makes use of IDXGIFactory1_IsCurrent and caches the DXGI instance along with the videocontroller struct. However as of latest patch (5.something) it looks like League isn't (ab)using this wbemprox query anymore so this may be not needed. I attached an updated patch in case someone runs into this in future. Ciao, Riccardo -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 bitfreak <bitfreak25(a)gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bitfreak25(a)gmx.de --- Comment #6 from bitfreak <bitfreak25(a)gmx.de> --- It seems to be, that this is maybe valid for the newest League of Legends, where some people (not only me) getting a framedrop after some time. I did not now exactly, how I can test your patch @Riccardo. Can someone give me an advice? bitfreak -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 fjfrackiewicz(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fjfrackiewicz(a)gmail.com --- Comment #7 from fjfrackiewicz(a)gmail.com --- (In reply to bitfreak from comment #6)
It seems to be, that this is maybe valid for the newest League of Legends, where some people (not only me) getting a framedrop after some time. I did not now exactly, how I can test your patch @Riccardo. Can someone give me an advice?
bitfreak
The Wiki goes into some detail about how to patch your local version of Wine: https://wiki.winehq.org/Regression_Testing#Patching_your_git_tree You apply the patch and recompile Wine with the patch and test if everything works :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 --- Comment #8 from bitfreak(a)icqmail.com --- The patch Riccardo attached does not work -> "error: patch failed: dlls/wbemprox/builtin.c:2837". I expect many things have changed to wine during the last time, so the patch have to be adjusted. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 --- Comment #9 from bitfreak(a)icqmail.com --- I could include the Patch into the newest Wine-Version 2.1 manually. But the Bug in League of Legends (Bug #42460) still exists. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |d511872a3d0dce5148d23ce5cbf | |80c989d484b26 Resolution|--- |FIXED --- Comment #10 from Hans Leidekker <hans(a)meelstraat.net> --- Should be fixed with d511872a3d0dce5148d23ce5cbf80c989d484b26. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38879 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla