Skip to content

test: budget the recompile of an edited page - #700

Merged
Espoir-Loem merged 1 commit into
developfrom
test/459-recompile-budget
Nov 28, 2026
Merged

Espoir-Loem merged 1 commit into
developfrom
test/459-recompile-budget

Conversation

@Espoir-Loem

Copy link
Copy Markdown
Member

Issue #459 asked for a budget on the Python half of a reload. tests/perf/test_recompile_budget.py now compiles a page that imports three components, warms up, then edits and recompiles it five times and checks the median against 50 ms. It uses the same Compiler().compile(input=...) call as scripts/measure_speed.py, which publishes 1.8 ms for this step.

The project uses the nexy_project fixture so its nexyconfig.py and cached src modules cannot leak into later tests. Injecting time.sleep(0.1) into Compiler.compile makes the test fail with median 102.6 ms; the source was restored afterwards.

All local gates pass: 20533 tests, 94.25 percent coverage, lint, format, mypy, structure, COM check, diff coverage and bandit.

Closes #459

@Espoir-Loem
Espoir-Loem merged commit b26cbb8 into develop Nov 28, 2026
17 checks passed
@Espoir-Loem
Espoir-Loem deleted the test/459-recompile-budget branch November 28, 2026 17:39
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