mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Greatly improve performance of direct panel loading
Still needs to be async'd
This commit is contained in:
parent
90af472717
commit
ed84cd2035
@ -274,11 +274,12 @@ namespace osu.Game.Overlays
|
||||
Filter.DisplayStyleControl.Dropdown.Current.Value,
|
||||
Filter.Tabs.Current.Value); //todo: sort direction (?)
|
||||
|
||||
getSetsRequest.Success += r =>
|
||||
getSetsRequest.Success += response =>
|
||||
{
|
||||
BeatmapSets = r?.
|
||||
Select(response => response.ToBeatmapSet(rulesets)).
|
||||
Where(b => beatmaps.QueryBeatmapSet(q => q.OnlineBeatmapSetID == b.OnlineBeatmapSetID) == null);
|
||||
var onlineIds = response.Select(r => r.OnlineBeatmapSetID);
|
||||
var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).Select(r => r.OnlineBeatmapSetID).ToList();
|
||||
|
||||
BeatmapSets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID));
|
||||
|
||||
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user