diff --git a/CHANGELOG.md b/CHANGELOG.md index fa018503f..d1c04588d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Fixed: * The Live Timings timer will now show the number of days remaining in an event if it is longer than a day. * Fixes an issue where duplicating a Race Weekend in a Championship could cause Server Manager to crash. * Fixes an issue where decimal values could not be modified in Real Penalty Options. +* Fixes an issue where scheduled Championship Race Weekends could cause excessive CPU load when rendering the calendar. * Race Weekend sessions with multiple parents now filter out any duplicate entrants, keeping the entrant with the lowest sort position. --- diff --git a/scheduled_races.go b/scheduled_races.go index 0ae25ef64..7b6a9192c 100644 --- a/scheduled_races.go +++ b/scheduled_races.go @@ -193,7 +193,7 @@ func (srm *ScheduledRacesManager) getScheduledRaces(forAllServers bool) ([]Sched } for _, championship := range championships { - for _, event := range championship.Events { + for _, event := range ExtractRaceWeekendSessionsIntoIndividualEvents(championship.Events) { if event.Scheduled.IsZero() || (!forAllServers && event.ScheduledServerID != serverID) { continue } @@ -211,12 +211,7 @@ func (srm *ScheduledRacesManager) getScheduledRaces(forAllServers bool) ([]Sched for _, raceWeekend := range raceWeekends { if raceWeekend.HasLinkedChampionship() { - raceWeekend.Championship, err = srm.store.LoadChampionship(raceWeekend.ChampionshipID.String()) - - if err != nil { - logrus.WithError(err).Warnf("Could not load linked Championship for Race Weekend") - continue - } + continue // they'll be picked up from championship events } for _, session := range raceWeekend.Sessions {