JavaScript is required to use Bungie.net

Destiny 2

Discutez de tout ce qui concerne Destiny 2.
Modifié par AlphaSerenity : 5/9/2022 11:55:19 AM
2

Bug Report - Excessive API calls to SteamWorks GetFriendRelationship

I've been trying to find a cause for the PC build's performance problems and came across something interesting. Using the Steam console, I was able to log calls made to the Steam API from Destiny to get a general picture. In my research I discovered that each time I loaded an interface or returned focus to the game window, the client would make a SDK call to the GetFriendRelationship function. It would normally do this for each entry in my friends and clan list and sometimes it would do it continuously. GetFriendRelationship returns the relationship between you and another Steam user (friends, not friends, etc). The interesting thing is in each call, the ID being passed is my own Steam ID and the result is always 0 (k_EFriendRelationshipNone). In a 2 minute period where all I did was launch the game, enter the Tower, return to orbit, then logged out, the client made 13,400+ calls to this function. In comparison, another game only made 120 calls with similar actions in a similar duration in time. I think a call is being made for each person in your friends list and due to the blocking, it is hindering application performance when trying to process all of this. [u]Here is output from the console for another test of just 7 seconds:[/u] [quote]Calls over the last 7082 milliseconds: Process Method Calls First Last -------------------- ---------------------------------------- ---------- ---------- ---------- destiny2.exe IClientFriends::GetFriendRelationship [u]660[/u] 1827 7064 [/quote] I assume in the code to refresh the clans/friends list, they have something like this: [quote]CSteamID id = SteamUser()->GetSteamID(); //Then later on, something like: int nFriends = SteamFriends()->GetFriendCount( k_EFriendFlagImmediate ); if ( nFriends == -1) { printf( "GetFriendCount returned -1, the current user is not logged in.\n" ); nFriends = 0; } for ( int i = 0; i < nFriends; ++i ) { CSteamID friendSteamID = SteamFriends()->GetFriendByIndex( i, k_EFriendFlagImmediate ); const char *friendName = SteamFriends()->GetFriendPersonaName( friendSteamID ); EFriendRelationship relationship = SteamFriends().GetFriendRelationship(id); <-- Note the wrong id is being referenced here instead of friendSteamID // Other code to add these details to some list to render }[/quote] Also, I would be very happy if someone at Bungie would use the [url=https://partner.steamgames.com/doc/api/ISteamNetworkingUtils#EstimatePingTimeFromLocalHost]EstimatePingTimeFromLocalHost[/url] SDK function and render the latency to the Activity Host and each peer we are playing with on the roster. There is a [url=https://partner.steamgames.com/doc/api/ISteamNetworkingSockets#GetQuickConnectionStatus]GetQuickConnectionStatus[/url] function as well that is more lightweight.

Langue du message :

 

Modifier
Prévisualiser

Jouez selon les règles. Prenez une minute pour lire notre Code de conduite avant d'envoyer le message. Annuler Modifier Créer l'escouade Publier

Vous n'êtes pas autorisé(e) à visionner ce contenu.
;
preload icon
preload icon
preload icon