Saving a bracket result was slow and left the projected-points column
showing pre-result EVs until the next simulation.
Root causes:
- Side effects ran in the wrong order: recalculateAffectedLeagues
(which reads EVs to compute projected points) fired before
updateProbabilitiesAfterResult wrote the new EVs.
- calculateTeamProjectedScore issued one getParticipantEV query per
unfinished pick, multiplied by every team in every affected league.
Changes:
- Swap side-effect order in processMatchResult, processPlayoffEvent,
and the set-round-winners route so probabilities update first.
- Pre-fetch every EV referenced by a season's draft picks in a single
inArray query inside recalculateStandings and pass the map down to
calculateTeamProjectedScore (with a getParticipantEV fallback).
- Add skipProbabilities option to processPlayoffEvent and use it from
autoCompleteRoundIfDone, where the caller has already refreshed EVs.
Fixes#31
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>