From 58992b274290b12e2a399b877ecb1ac4541e828d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 23 Feb 2024 11:23:11 +0800 Subject: [PATCH] Materialise realm collection hashes during song select search process Without this, there's a large overhead to do a realm-live `Contains` search when a collection is selected. This may also help considerably alleviate https://github.com/ppy/osu/discussions/27298#discussioncomment-8552508 as we will be performing the native realm search much less. --- osu.Game/Screens/Select/FilterControl.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 1827eb58ca2a..6fd22364f69c 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -4,6 +4,7 @@ #nullable disable using System; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; @@ -64,7 +65,7 @@ public FilterCriteria CreateCriteria() Sort = sortMode.Value, AllowConvertedBeatmaps = showConverted.Value, Ruleset = ruleset.Value, - CollectionBeatmapMD5Hashes = collectionDropdown.Current.Value?.Collection?.PerformRead(c => c.BeatmapMD5Hashes) + CollectionBeatmapMD5Hashes = collectionDropdown.Current.Value?.Collection?.PerformRead(c => c.BeatmapMD5Hashes).ToList() }; if (!minimumStars.IsDefault)