mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:43:20 +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.DisplayStyleControl.Dropdown.Current.Value,
|
||||||
Filter.Tabs.Current.Value); //todo: sort direction (?)
|
Filter.Tabs.Current.Value); //todo: sort direction (?)
|
||||||
|
|
||||||
getSetsRequest.Success += r =>
|
getSetsRequest.Success += response =>
|
||||||
{
|
{
|
||||||
BeatmapSets = r?.
|
var onlineIds = response.Select(r => r.OnlineBeatmapSetID);
|
||||||
Select(response => response.ToBeatmapSet(rulesets)).
|
var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).Select(r => r.OnlineBeatmapSetID).ToList();
|
||||||
Where(b => beatmaps.QueryBeatmapSet(q => q.OnlineBeatmapSetID == b.OnlineBeatmapSetID) == null);
|
|
||||||
|
BeatmapSets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID));
|
||||||
|
|
||||||
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
|
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user