From e7504d0b12fbb773ed5b86b1e3e389414a085d95 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 17 Jul 2024 22:51:24 -0400 Subject: [PATCH] Remove Leaderboard Fetch when Getting Info The cause of the leaderboard spam was primarily this call where if there was an attempt to get leaderboard info and there wasn't already, there would be a fetch request. This is bad for many reasons: some games have hundreds of boards that will be fetched at startup, if there's simply no data to populate that board, this will just continue to fetch every time the dialog needs to update. To mitigate this, I simply don't load leaderboard information until there are events for that leaderboard - less information for the player, sadly, but heavily cuts down on the number of leaderboard fetches. --- Source/Core/Core/AchievementManager.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index 7788876139b1..7dab23d5f643 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -479,8 +479,6 @@ AchievementManager::GetLeaderboardInfo(AchievementManager::AchievementId leaderb if (const auto leaderboard_iter = m_leaderboard_map.find(leaderboard_id); leaderboard_iter != m_leaderboard_map.end()) { - if (leaderboard_iter->second.entries.size() == 0) - FetchBoardInfo(leaderboard_id); return &leaderboard_iter->second; }