perf: optimize featured cross-country trip generation and add tests

This commit is contained in:
Trey t
2026-02-10 20:11:38 -06:00
parent c6fa6386fd
commit e9c15d70b1
3 changed files with 401 additions and 85 deletions

View File

@@ -154,7 +154,7 @@ final class AppDataProvider: ObservableObject {
throw DataProviderError.contextNotConfigured
}
let sportStrings = sports.map { $0.rawValue }
let sportStrings = Set(sports.map(\.rawValue))
let descriptor = FetchDescriptor<CanonicalGame>(
predicate: #Predicate<CanonicalGame> { game in
@@ -179,7 +179,7 @@ final class AppDataProvider: ObservableObject {
throw DataProviderError.contextNotConfigured
}
let sportStrings = sports.map { $0.rawValue }
let sportStrings = Set(sports.map(\.rawValue))
let descriptor = FetchDescriptor<CanonicalGame>(
predicate: #Predicate<CanonicalGame> { game in