diff options
Diffstat (limited to 'internal/calendar/calendar.go')
| -rw-r--r-- | internal/calendar/calendar.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/calendar/calendar.go b/internal/calendar/calendar.go index d918547..00048b7 100644 --- a/internal/calendar/calendar.go +++ b/internal/calendar/calendar.go @@ -67,7 +67,14 @@ func computeEF(date time.Time, sel Selection, layers []Layer) LiturgicalDay { // RG 97/98: the year's impeded I-class transfers are resolved as a set, // not one at a time, so two feasts impeded by the same early Easter cannot // both claim the same free day and lose one of themselves. - plan := efTransferPlan(year, merged, sel, occ1, occ1Or2) + // + // efTransferPlan is pure in (year, merged content, sel) and identical for + // every day of the year it is asked about -- computeEF runs once PER DAY, + // so a multi-day view (mobile.Days's week, a month view) was rebuilding + // it from scratch on every single one. efTransferPlanCached memoises it; + // see transfer_plan_cache.go for the cache key and why each of its three + // parts is load-bearing. + plan := efTransferPlanCached(year, merged, sel, occ1, occ1Or2) cands := []candidate{{Cel: td.Cel, Temporal: true, Season: td.Season, Sunday: td.Sunday}} for slug, rc := range merged { cel := buildCelebration(slug, rc) |
