Skip to content

Warm up the small-grid perf budget test to absorb cold-start noise - #86

Merged
marota merged 1 commit into
mainfrom
claude/detachable-viz-tabs-c2Wbw
Apr 14, 2026
Merged

marota merged 1 commit into
mainfrom
claude/detachable-viz-tabs-c2Wbw

Conversation

@marota

@marota marota commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

The small-grid variant measured the cold first call to simulate_manual_action, while its large-grid sibling already ran a warmup iteration before timing. On a loaded CI machine the first call can spike past the 150ms budget because of module import resolution, MagicMock attribute caching and cold BLAS/pandas paths, even though the steady-state logic runs in roughly 3-10ms.

Mirror the large-grid test's warmup pattern, then rebuild the env.get_obs side_effect iterator so the timed call still has a fresh pair of observations to consume.

The small-grid variant measured the cold first call to
simulate_manual_action, while its large-grid sibling already ran a
warmup iteration before timing. On a loaded CI machine the first call
can spike past the 150ms budget because of module import resolution,
MagicMock attribute caching and cold BLAS/pandas paths, even though
the steady-state logic runs in roughly 3-10ms.

Mirror the large-grid test's warmup pattern, then rebuild the
env.get_obs side_effect iterator so the timed call still has a fresh
pair of observations to consume.
@marota
marota merged commit 67a045a into main Apr 14, 2026
2 checks passed
marota pushed a commit that referenced this pull request Apr 30, 2026
Reconciliation of section 2 (0.5.0):
- Drop misattributed PRs that were actually pre-rebrand: save/reload
  (#49/#52), MW Start (#62), interaction-logging (#64), SLD highlights
  (#63), load shedding initial integration (#61). All now properly
  cited in section 1.5–1.6.
- Disambiguate App.tsx refactor history: PR #56 (hooks, 2100 → 800,
  pre-rebrand) vs PR #74 (components, 1000 → 650, 0.5.0) vs PR #75
  (memoization Phase 2, same LoC).
- Add accurate 0.5.0 PRs: #66 (vectorization w/ benchmark table),
  #69/#70/#71 (UI polish), #72 (curtailment), #73 (loads_p/gens_p
  format + configurable MW), #74/#75 (App.tsx decomposition),
  #78 (PST tap re-simulation), #84/#86/#87/#90 (detachable tabs).
- Add a recap table summarizing what's truly new in 0.5.0.

Diagrams added (Mermaid, GitHub-rendered):
- Gantt timeline of all 4 phases (top of doc).
- High-level architecture (frontend / backend / data).
- Two-step analysis sequence diagram (section 1.6).
- App.tsx LoC evolution flow (section 2.4).
- Backend mixin decomposition before/after PR #104/#106 (section 3).
- PyPSA-EUR pipeline flowchart (section 4).

https://claude.ai/code/session_01Pg7fuCUG2edfm5PyHS6SbN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant