judgeDay and hasMissedGameDayBetween re-ran the same listByDate query for every user in an archive run (U× amplification for the archived date plus its look-back window). Introduce a memoizing GameDayCache and thread one instance through the whole runDailyArchive pass so each distinct date is read from Firestore once. Off-day detection is naturally memoized via the cached query results. Standalone callers (statsService) keep their prior behavior via a per-call default cache. No change to judgment results.
Description
No description provided
Languages
TypeScript
85.5%
HTML
14.5%