Repository navigation
A world no longer hangs while its railway is planned; perf gate: noise is not a slow build - #526
Merged
Merged
Conversation
…ells noise from a slow build; four plan tests load the game again - Rail.make (35_track.js): every plan of a loop costs it a town or a side of its last town, so the planning ends (fix by the streets thread; seeds 5150, 260429754 and 20261146 never came back, the start screen froze on such a seed). tools/rail.mjs test counts the plans. - tools/perf.lib.mjs: a difference counts when the turns of the two builds stand apart, eight turns each; two turns are a first look and a suspicion gets more turns of its scenario alone (ab). The same build failed 65% of the PR runs by the old rule. perf.yml keeps every turn's report as an artifact. - plan, villa, roomy tests: 09_core.js in their file lists (PADB); hut.test loads the whole game instead of a hand-kept list. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdrPyoU594YpAeAd6En
k06a
force-pushed
the
claude/project-thread-n5wg8s
branch
from
December 2, 2026 22:46
5bb0f29 to
4eb9969
Compare
Contributor
⏱ Performance: this PR against mainScenarios of src/game/98_perf.js, the two builds by turns on one runner (tools/perf.mjs, CPU side, draws counted not drawn). ✅ No regression against main
Over budget (ms/frame, budget): drive Land.lightTick 13.12 > 1 · drive Land.gen 4.30 > 0 · drive Land.meshChunk 2.12 > 1 · tunnel Land.lightTick 2.05 > 1 · flight Land.gen 0.90 > 0 · tunnel Land.gen 0.30 > 0 · drive gl.upload 0.97 > 0.8 · tunnel Land.meshChunk 1.15 > 1 Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Anton · project thread "Green main and a merge queue"
The hang (hotfix)
Rail.make(gw 71 and later) could plan a railway loop for ever: with one town left and no side of it that the grade suits, the same plan was asked again and again. A world with such a region next to it never came back: the game froze while the world was made, and since the start screen shows a world of a random seed, a fresh start could freeze too (in headless runs that is theNavigation timeout of 30000 msof several tests, the tests killed after 25 minutes, and release runs that never end).The fix is by the streets thread (it also sits in #499): every plan costs the loop a town or one of the four sides of its last town; no town left, no line.
tools/rail.mjs testcounts the plans of the three seeds that hung (5150 town+sea, 260429754 forest, 20261146 town): it fails on main and passes here. No world that came back before changes, so no golden hash moves and no generator number is needed.The perf gate
Of 110 PR runs today where both sides were the same file, 65% ended "Slower than main". The verdict came from two turns of each build with the range of the two as the noise; with some forty comparisons a run that is a false alarm most of the time.
Now a difference counts by its size (tolerance and floor, as before) and only when the turns of the two builds stand apart, eight turns each (at most 3 of the 64 pairs the wrong way round: by chance once in 1840). Two turns are a first look: a scenario that looks slower gets two more turns of each build alone, until its turns mix or eight still stand apart. On simulated turns with the noise of a runner: the same build is called slower in 1% of runs, a scenario 30% slower is caught in 95% (
tools/perf.test.mjs). The job keeps every turn's report as an artifact (perf-turns), so the real noise of the runners can be measured.Tests that could not start
plan,villa,roomy: their hand-kept file lists lacked09_core.js(PADB).hut: loads the whole game without a page (tools/gen/load.mjs) instead of a list that had fallen behind four files.Checked
node tools/rail.mjs test: oknode tools/perf.test.mjs: all passed;plan,villa,roomy,hut: oktools/perfgate.test.mjs(a build 10 ms a frame slower must fail the gate)Generated by Claude Code