[Bug 48668] rFactor2 - Physics thread slower on multiplayer mode

WineHQ Bugzilla wine-bugs at winehq.org
Sat Jun 6 06:55:14 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48668

--- Comment #10 from Bernat Arlandis <berarma at hotmail.com> ---
(In reply to Paul Gofman from comment #9)
> 
> Regarding the problem itself, there slow down comes from getsockname()
> function which is called very frequently by the application, roughly ~800
> times per second from different threads. The implementation of that in Wine
> is rather heavy as it involves querying the network interfaces, so the
> function can take about solid 2-3ms. Applications usually do not call
> getsockname() often, so that was never a problem before. The fix to this
> looks a bit hacky and not fully correct. I am not immediately sure that a
> small but non-hacky fix is possible, or some much longer solution to
> optimize getsockname() will be considered particularly useful for upstream
> Wine.
> 
> In the view of that, since there is a contact with the game developer who
> was so kind to look at the problem from the game's statistics side and to
> provide us with the helpful information, is it maybe possible to ask him if
> so frequent use of getsockname() is intentional? I can guess it might needed
> to track IP address change, but in any case are there any reasons to do it
> that often? If not, maybe they would want to change it and do it much less
> frequently? It most likely does not impose a performance problem on Windows,
> but yet if it is not really needed probably no reason to keep that in time
> critical threads.

That sounds perfectly reasonable but I'm not sure the developer will be
interested on a fix for a platform they don't support. Also, they seem to be
putting more effort adding content than improving their software these days.
Simracing is a pretty small market, although it's now growing, and the Linux
market for a hardcore simulator is even smaller. Some of us want to change that
though.

Besides, Windows developers tend to see these issues as Linux weaknesses. They
may tell us Linux/Wine is broken. The fact is that Windows is performing much
better in this case and they could refuse to fix it on this basis. Isn't Wine
supposed to work similar to Windows?

I'll try anyway, but in case the developer puts it in the long queue of
things-we-would-like-to-do-but-never-get-to or simply says no, I'd try looking
for a definitive solution. You've made the hard work of pointing at the problem
and providing a simple solution that works, I guess we could work from there.

Thanks again!

-- 
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.



More information about the wine-bugs mailing list