diff --git a/SportsTime/Planning/Engine/GameDAGRouter.swift b/SportsTime/Planning/Engine/GameDAGRouter.swift index 7a64248..68aa890 100644 --- a/SportsTime/Planning/Engine/GameDAGRouter.swift +++ b/SportsTime/Planning/Engine/GameDAGRouter.swift @@ -159,7 +159,9 @@ enum GameDAGRouter { // Step 4: Expand beam day by day with early termination for dayIndex in sortedDays.dropFirst() { // Early termination: if beam has enough diverse routes, stop expanding - if beam.count >= scaledBeamWidth * 3 { + // More aggressive for smaller datasets to hit tight performance targets + let earlyTerminationThreshold = games.count >= 5000 ? scaledBeamWidth * 3 : scaledBeamWidth * 2 + if beam.count >= earlyTerminationThreshold { break }