https://bugs.winehq.org/show_bug.cgi?id=48668
--- Comment #13 from Paul Gofman pgofman@codeweavers.com --- (In reply to Bernat Arlandis from comment #12) ]
? There might be something fundamentally wrong in the way this function is implemented either by Wine or Linux (unlikely), or it's just that Windows is doing the same caching you've implemented here.
Probably neither of that. Some in depth aspects of socket implementation on Windows and Linux differ, and Wine has to implement certain additional processing in getsockname() to make it behave exactly as on Windows for UDP sockets bound to specific IP addresses (otherwise some apps will be broken). That was not a problem for other applications as getsockname() is not something the applications usually call in their time critical paths.
Can you please try the patch which I sent upstream [1] if it is still fixes the car speed? I tested it myself with the load indicator and it looks the same as with the initial version of the patch, but just in case.
1. https://source.winehq.org/patches/data/186770