perf(vk): a start reads the pipeline notes file once, not twice (about 0.28 s off every start) #1873

Merged
HumanBean merged 8 commits from klimovich008/Longshot:perf/note-refs-once into main 2026-11-20 17:15:25 +00:00
Member

Summary

Every start of the game read the whole pipeline notes file, cache/longshot_pipelines.bin, twice for the same list: once for the driver-cache check (notes_lost_by_driver) and again for the load at create (precompile_at_create), and three times when the warm pass ran too. On my PC that file is 1.0 GB with 37,474 notes, and a walk takes about 0.28 s when the file is in the OS's cache. This PR walks it once a start and hands the same list to each step, so every start is about 0.28 s shorter. Nothing a player sees changes, apart from that.

The list is reused only when it is certainly the file's current content: the walk read the whole file, and the file's size, last write time and first 16 bytes are the same as when it was walked. Otherwise the step walks again, as before. Nothing in the game writes the notes file between these steps (the state list writes it before, play appends after the load at create has taken the list).

Read first: start_note_refs and notes_file_id in gpu/vk/vk_draw.cpp; pipe_notes_refs now also says whether it read the whole file (whole). Each of the three steps takes the list through start_note_refs; the load at create takes it for good, and a start that does not load at create lets it go (precompile_run).

No switch: the steps get the same notes in the same order as before, and any case where the file could differ walks again. The shader caches are not invalidated (no file of the shader-cache stamp changed: vk_draw.cpp and vk_pipelines.h are not in nx2/translator_files.py).

Testing

Tested: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D, the notes file on a SATA SSD. 34 starts into Hyrule Field (the standard test's settings, uncapped) from the commits here before the merge with main, main's renderer and this PR's swapped into one game folder before each start, alternating: 26 on the first version (bc3cca59) and 8 on a87d6d5e. Two of them, one a side, ran the warm pass first (the marker of a finished warm removed), as a first start after an update does. Every PR start logged one walk of the notes file; main walks two or three times. The game played normally: game clock 0.998 to 1.002, no new error lines, and the notes file stayed byte-identical across all starts (same SHA-256 as before them); the other cache files changed the same way in both arms.

Checks (on the merged head, Windows, llvm-mingw):

  • tests/test_note_refs_once.py (new): a synthetic notes file (no game data) in 13 shapes (duplicate keys, notes refused, a tail cut in five places, an empty file, a wrong stamp or record size, no file): the new walk gives exactly main's list. Then the start's shapes (normal, driver lost the notes, --prepare-shaders) walk once, and a file that grew, was rewritten (new time or new size alone), could not be opened, was locked against reads, or failed a read or seek part way is walked again. Nine broken variants each fail their own case. It fails on main. Passes with clang++ (llvm-mingw), g++ (MSYS2) and g++ on Linux (WSL).

  • tests/test_start_progress_at_create.py and tests/test_quit_not_crash.py cut these functions from the source: each gets one stub line for the new state; both pass, as does tests/test_cold_cache_check.py.

  • tests/run_all.py --jobs 4: 762 passed, 66 failed, 54 skipped on Windows; a clean checkout of main 89c3d21e on the same PC: 761 passed, the same 66 failed (65 FAIL and test_vbytes.py's 600 s timeout), 54 skipped. The extra pass is the new test. Those 66 fail on this PC's Windows setup on main too (CI runs the suite on Linux):

    the 66, failing on main as well

    test_appimage_player_build.py, test_auto_handheld.py, test_bug_report_defaults.py, test_capture_read_once.py, test_capture_readback_visibility.py, test_crash_dialog.py, test_crt_options.py, test_damage_debug_menu.py, test_dev_ab.py, test_dev_build.py, test_dev_migrate.py, test_dev_packs.py, test_display_startup_failure.py, test_dlss_feature_size.py, test_draw_binds.py, test_draw_stream_visibility.py, test_early_split_before_draw.py, test_failed_compile_keeps_objects.py, test_frame_overlap.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_game_menu_mouse_buttons.py, test_guest_imported.py, test_high_fps_fixes.py, test_hold_gpu.py, test_host_guest_writes.py, test_hud_layout_row.py, test_job_queue.py, test_libc_hooks.py, test_lift_cache.py, test_linux_preflight.py, test_linux_pressure.py, test_longshot_ctl.py, test_low_vram_texture_mips.py, test_make_game_ngx.py, test_mise_build.py, test_missing_nup.py, test_mods_list.py, test_ngx_sdk.py, test_pads_after_menu.py, test_pass_barrier.py, test_pending_guest_import.py, test_pipeline_play_cache.py, test_prepare_cache_save.py, test_present_queue_default.py, test_present_source_crop.py, test_profiling_mode.py, test_psychov35_fsr3_fg.py, test_readback_early.py, test_readback_late.py, test_readback_timeout_source.py, test_recording_admission.py, test_replay_write_order.py, test_sampler_admission.py, test_sdiv_overflow.py, test_slow_frames.py, test_song_note_cue.py, test_split_before_draw.py, test_staging_burst.py, test_texel_buffer_ownership.py, test_ub_update_batch.py, test_upscaler_rows.py, test_vbytes.py, test_vcore_escape.py, test_vk_occlusion_queries.py, test_walk_key.py

  • Linux: vk_draw.cpp compiled with the Linux build's flags (clang 21, syntax only) here; the Test Farm's Linux testers built this PR's head cefaf33d from source and ran it, 2 starts a side against main 89c3d21e, no crash (NVIDIA: GTX 1070, RTX 4070; RADV: Steam Machine NAVI33).

Still to test:

  • Linux, NVIDIA and AMD (RADV): start the game twice a side on main and on this PR, expecting boot_time (and the start's shader seconds) about 0.25-0.3 s shorter with this PR and the same game afterwards (@Beanstalk)
  • Windows, NVIDIA: the same, expecting the same saving (@Beanstalk)
  • Steam Deck: one start each of main and this PR, expecting the line the notes' file walked 1 times this start and no new error lines (by hand)

Measurements

Verdict: every start about 0.28 s shorter: the second walk of the notes file is gone. A cold walk (the file not in the OS's cache) is not shortened: both sides pay one; main then pays a warm one on top.

Setup: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D, SATA SSD; the game's own log lines in 34 alternating starts (17 a side; 4 with the notes file dropped from the OS's cache first), over main 0de25c3e. 26 starts ran the first version (bc3cca59); the later commits only add the checks for a failed or changed walk (about 0.1 ms a start, timed game-free), and the merge with main changes none of this code.

Before: main @ 0de25c3e After: this PR @ a87d6d5e
walks of the notes file a start 2 (3 after an update) 1
"load at create ... in N ms" (holds main's second walk), n=17 276-323 ms, median 298 19-26 ms, median 20
the one walk, warm (this PR's own line), n=6 (not logged) 275-292 ms
"the shaders took", starts without the slow step below 4.1-4.5 s, median 4.3 (n=8) 3.9-4.1 s, median 4.0 (n=10)
the walk when the file was not in the OS's cache not logged (the same walk: 9.8-10.0 s game-free, n=10), then a warm walk 9.2-10.1 s (n=7), no second walk
  • "The shaders took" ran 13-25 s in some starts of both arms: a slower step before the walk (one thread busy around reading the 1.5 GB pipeline cache), the same on main. Those starts are left out of that row; they cannot show 0.3 s either way.
  • Frames in play: no change expected or seen (game clock 1.000, no frame over 100 ms in either arm, apart from one of 206 ms in main's first start on a fresh copy). The PR's renderer ran 1-2 % more fps in both sessions; I don't claim that, since a start-up change can't do it (most likely the two DLLs' build routes).
  • Not measured: Linux, NVIDIA, Intel, the Steam Deck, an NVMe drive, Windows Defender's real-time scan timed, a first start after a reboot, --prepare-shaders in the game.

Risks

  • A file changed by another program between the steps, keeping its size and time: a rewrite of longshot_pipelines.bin at the same size with the same last write time (or within one time tick of a FAT or exFAT drive) between the driver check and the load at create is not seen, and the load at create would look for notes at the old places. Nothing in the game writes the file there. Main's list was already exposed the same way for the rest of the session; this adds only the driver check's 40-180 ms (or the warm pass) to that window. A wrong place is caught by pipe_note_at's check on every note it reads: that pipeline is not loaded at create, as on a first start.
  • Two log lines end differently: the load at create's line ends with (the notes' file walked N times this start, in M ms: start_note_refs), and the warm pass's summary has ; the notes' file walked N times this start so far inside its last parenthesis. No script in the repository reads past those lines' times; a parser of your own anchored on the old endings would need a look.
  • Three or four more read-only opens of the notes file a start (16 bytes each, about 0.1 ms in all).
  • GPUs whose driver lacks pipelineCreationCacheControl skip the driver check, so they already walked once on a normal start: no change there.
  • To turn it off: revert. After updating, nothing changes for a player: no cache, save or longshot_options.ini is touched, and no shaders are prepared again.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows here; Linux: the Test Farm built cefaf33d from source, reports rp_a723f9e4a05d5bea, rp_2c0bd8afb270d731, rp_8df7ec4cbef3f6da.)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Every start of the game read the whole pipeline notes file, `cache/longshot_pipelines.bin`, twice for the same list: once for the driver-cache check (`notes_lost_by_driver`) and again for the load at create (`precompile_at_create`), and three times when the warm pass ran too. On my PC that file is 1.0 GB with 37,474 notes, and a walk takes about 0.28 s when the file is in the OS's cache. This PR walks it once a start and hands the same list to each step, so **every start is about 0.28 s shorter**. Nothing a player sees changes, apart from that. The list is reused only when it is certainly the file's current content: the walk read the whole file, and the file's size, last write time and first 16 bytes are the same as when it was walked. Otherwise the step walks again, as before. Nothing in the game writes the notes file between these steps (the state list writes it before, play appends after the load at create has taken the list). Read first: `start_note_refs` and `notes_file_id` in `gpu/vk/vk_draw.cpp`; `pipe_notes_refs` now also says whether it read the whole file (`whole`). Each of the three steps takes the list through `start_note_refs`; the load at create takes it for good, and a start that does not load at create lets it go (`precompile_run`). No switch: the steps get the same notes in the same order as before, and any case where the file could differ walks again. The shader caches are not invalidated (no file of the shader-cache stamp changed: `vk_draw.cpp` and `vk_pipelines.h` are not in `nx2/translator_files.py`). ## Testing **Tested:** Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D, the notes file on a SATA SSD. 34 starts into Hyrule Field (the standard test's settings, uncapped) from the commits here before the merge with main, main's renderer and this PR's swapped into one game folder before each start, alternating: 26 on the first version (bc3cca59) and 8 on a87d6d5e. Two of them, one a side, ran the warm pass first (the marker of a finished warm removed), as a first start after an update does. Every PR start logged one walk of the notes file; main walks two or three times. The game played normally: game clock 0.998 to 1.002, no new error lines, and the notes file stayed byte-identical across all starts (same SHA-256 as before them); the other cache files changed the same way in both arms. Checks (on the merged head, Windows, llvm-mingw): - `tests/test_note_refs_once.py` (new): a synthetic notes file (no game data) in 13 shapes (duplicate keys, notes refused, a tail cut in five places, an empty file, a wrong stamp or record size, no file): the new walk gives exactly main's list. Then the start's shapes (normal, driver lost the notes, `--prepare-shaders`) walk once, and a file that grew, was rewritten (new time or new size alone), could not be opened, was locked against reads, or failed a read or seek part way is walked again. Nine broken variants each fail their own case. It fails on main. Passes with clang++ (llvm-mingw), g++ (MSYS2) and g++ on Linux (WSL). - `tests/test_start_progress_at_create.py` and `tests/test_quit_not_crash.py` cut these functions from the source: each gets one stub line for the new state; both pass, as does `tests/test_cold_cache_check.py`. - `tests/run_all.py --jobs 4`: 762 passed, 66 failed, 54 skipped on Windows; a clean checkout of main 89c3d21e on the same PC: 761 passed, the same 66 failed (65 FAIL and `test_vbytes.py`'s 600 s timeout), 54 skipped. The extra pass is the new test. Those 66 fail on this PC's Windows setup on main too (CI runs the suite on Linux): <details><summary>the 66, failing on main as well</summary> test_appimage_player_build.py, test_auto_handheld.py, test_bug_report_defaults.py, test_capture_read_once.py, test_capture_readback_visibility.py, test_crash_dialog.py, test_crt_options.py, test_damage_debug_menu.py, test_dev_ab.py, test_dev_build.py, test_dev_migrate.py, test_dev_packs.py, test_display_startup_failure.py, test_dlss_feature_size.py, test_draw_binds.py, test_draw_stream_visibility.py, test_early_split_before_draw.py, test_failed_compile_keeps_objects.py, test_frame_overlap.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_game_menu_mouse_buttons.py, test_guest_imported.py, test_high_fps_fixes.py, test_hold_gpu.py, test_host_guest_writes.py, test_hud_layout_row.py, test_job_queue.py, test_libc_hooks.py, test_lift_cache.py, test_linux_preflight.py, test_linux_pressure.py, test_longshot_ctl.py, test_low_vram_texture_mips.py, test_make_game_ngx.py, test_mise_build.py, test_missing_nup.py, test_mods_list.py, test_ngx_sdk.py, test_pads_after_menu.py, test_pass_barrier.py, test_pending_guest_import.py, test_pipeline_play_cache.py, test_prepare_cache_save.py, test_present_queue_default.py, test_present_source_crop.py, test_profiling_mode.py, test_psychov35_fsr3_fg.py, test_readback_early.py, test_readback_late.py, test_readback_timeout_source.py, test_recording_admission.py, test_replay_write_order.py, test_sampler_admission.py, test_sdiv_overflow.py, test_slow_frames.py, test_song_note_cue.py, test_split_before_draw.py, test_staging_burst.py, test_texel_buffer_ownership.py, test_ub_update_batch.py, test_upscaler_rows.py, test_vbytes.py, test_vcore_escape.py, test_vk_occlusion_queries.py, test_walk_key.py </details> - Linux: `vk_draw.cpp` compiled with the Linux build's flags (clang 21, syntax only) here; the Test Farm's Linux testers built this PR's head cefaf33d from source and ran it, 2 starts a side against main 89c3d21e, no crash (NVIDIA: [GTX 1070](https://beanstalk.magicbean.dev/reports/rp_a723f9e4a05d5bea), [RTX 4070](https://beanstalk.magicbean.dev/reports/rp_2c0bd8afb270d731); RADV: [Steam Machine NAVI33](https://beanstalk.magicbean.dev/reports/rp_8df7ec4cbef3f6da)). **Still to test:** - Linux, NVIDIA and AMD (RADV): start the game twice a side on main and on this PR, expecting `boot_time` (and the start's shader seconds) about 0.25-0.3 s shorter with this PR and the same game afterwards (@Beanstalk) - Windows, NVIDIA: the same, expecting the same saving (@Beanstalk) - Steam Deck: one start each of main and this PR, expecting the line `the notes' file walked 1 times this start` and no new error lines (by hand) ## Measurements **Verdict:** every start about 0.28 s shorter: the second walk of the notes file is gone. A cold walk (the file not in the OS's cache) is not shortened: both sides pay one; main then pays a warm one on top. Setup: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D, SATA SSD; the game's own log lines in 34 alternating starts (17 a side; 4 with the notes file dropped from the OS's cache first), over main 0de25c3e. 26 starts ran the first version (bc3cca59); the later commits only add the checks for a failed or changed walk (about 0.1 ms a start, timed game-free), and the merge with main changes none of this code. | | Before: main @ 0de25c3e | After: this PR @ a87d6d5e | |---|---|---| | walks of the notes file a start | 2 (3 after an update) | 1 | | "load at create ... in N ms" (holds main's second walk), n=17 | 276-323 ms, median 298 | 19-26 ms, median 20 | | the one walk, warm (this PR's own line), n=6 | (not logged) | 275-292 ms | | "the shaders took", starts without the slow step below | 4.1-4.5 s, median 4.3 (n=8) | 3.9-4.1 s, median 4.0 (n=10) | | the walk when the file was not in the OS's cache | not logged (the same walk: 9.8-10.0 s game-free, n=10), then a warm walk | 9.2-10.1 s (n=7), no second walk | - "The shaders took" ran 13-25 s in some starts of both arms: a slower step before the walk (one thread busy around reading the 1.5 GB pipeline cache), the same on main. Those starts are left out of that row; they cannot show 0.3 s either way. - Frames in play: no change expected or seen (game clock 1.000, no frame over 100 ms in either arm, apart from one of 206 ms in main's first start on a fresh copy). The PR's renderer ran 1-2 % more fps in both sessions; I don't claim that, since a start-up change can't do it (most likely the two DLLs' build routes). - Not measured: Linux, NVIDIA, Intel, the Steam Deck, an NVMe drive, Windows Defender's real-time scan timed, a first start after a reboot, `--prepare-shaders` in the game. ## Risks - **A file changed by another program between the steps, keeping its size and time:** a rewrite of `longshot_pipelines.bin` at the same size with the same last write time (or within one time tick of a FAT or exFAT drive) between the driver check and the load at create is not seen, and the load at create would look for notes at the old places. Nothing in the game writes the file there. Main's list was already exposed the same way for the rest of the session; this adds only the driver check's 40-180 ms (or the warm pass) to that window. A wrong place is caught by `pipe_note_at`'s check on every note it reads: that pipeline is not loaded at create, as on a first start. - **Two log lines end differently:** the load at create's line ends with `(the notes' file walked N times this start, in M ms: start_note_refs)`, and the warm pass's summary has `; the notes' file walked N times this start so far` inside its last parenthesis. No script in the repository reads past those lines' times; a parser of your own anchored on the old endings would need a look. - Three or four more read-only opens of the notes file a start (16 bytes each, about 0.1 ms in all). - GPUs whose driver lacks `pipelineCreationCacheControl` skip the driver check, so they already walked once on a normal start: no change there. - To turn it off: revert. After updating, nothing changes for a player: no cache, save or `longshot_options.ini` is touched, and no shaders are prepared again. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows here; Linux: the Test Farm built cefaf33d from source, reports rp_a723f9e4a05d5bea, rp_2c0bd8afb270d731, rp_8df7ec4cbef3f6da.) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
notes_lost_by_driver, precompile_warm and precompile_at_create each walked
longshot_pipelines.bin for the notes' references (pipe_notes_refs): two walks on
a normal start that loads at create calls, three when the driver had lost the
notes. All three run on precompile_run's thread before the game, and none of them
writes the notes file, so the start's uses now go through start_note_refs, which
walks once and keeps the references while the file's size and time stay as they
were before the walk; a changed file is walked again. precompile_at_create, the
last use, takes them for programs_index. The precompile's lines say how many
walks the start made.

tests/test_note_refs_once.py: one walk over the three start shapes, a file that
grew, was rewritten at the same size or appeared walked again, with a broken
variant (the kept references used unchecked) that must fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The checker's mutations showed the size half of start_note_refs' check untested: every append in the
fixture also moved the file's time. Adds a file grown with its time put back (as FAT or exFAT can show
an append) and two broken variants, one without the size compared and one without the time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A walk that could not open longshot_pipelines.bin (another program holding it with reads denied, while its size and time still
read) or had a read fail part way was kept, because the file's size and time had not moved: the load at create then indexed
none or part of the notes, and play appended every pipeline it met again. Main walked again and read them all.

pipe_notes_refs says whether it read the whole file (opened, no read failed: ferror). start_note_refs keeps a walk only from a
whole read and a size and time it could read; a time it cannot read counts as an unread size, so error values never compare
equal. A file honestly without notes is still kept, with main's same empty answer; a missing one walks again at each use.

The test adds the held file (Windows: _sopen_s _SH_DENYRW; everywhere: the open failing), a read failing part way (Windows:
LockFileEx on a note; elsewhere: a stream whose reads fail), an unreadable size and time, and an unreadable time alone, with
a broken variant for each; a broken variant now counts as caught only by the fixture's own FAIL line, not by a crash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the second review of f402ef0e:
- a whole walk was still reused when another program took the file with reads denied before the load at create (its size
  and time unchanged); main's second walk read nothing there. The file's identity now includes that it opens and its head
  reads, as notes_open_locked reads it: such a use walks again, as main's did.
- a seek that failed part way left the stream's error flag clear, so a part walk counted as whole. A walk is whole when it
  ended at the file's end (feof, which a seek clears, and no ferror); a wrong stamp's walk is not kept (one head read a use).

The test adds the file locked against reads after a whole walk (Windows: _sopen_s _SH_DENYRD), a seek failing part way, and
on POSIX a read failing part way (the stream's descriptor turned into a folder's), with a broken variant for each. Each broken
variant must now fail its own case's check, named in BROKEN, not any check. The fixture runs in its folder, its files' path
".", so no path passes through a narrow argv.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the third review of 6d893d82: on a C library or file system whose stdio buffer held the whole fixture file from the head's
read, the swapped descriptor was never read before the walk ended, so the case failed a correct walk; the stand-in now gives
that stream a 4 KB buffer. The unreadable-unseen variant's own check was matched by the Windows case's name too; it now names
the stand-in case's check alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the fourth review of 031407f6: glibc takes setvbuf's size only with a buffer given, and with a null one sizes it by the
file system's block. The stand-in now passes a static 4 KB buffer (its streams never overlap).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the fifth review of 5c3a2da9: when the warm pass leaves no marker (its cache folder read-only, say), precompile_run goes on
to the whole precompile and play without the load at create ever taking the references the check or the warm pass kept: about
4 MB for 37,474 notes, held for the session, where main let each walk's go. precompile_run lets them go where it leaves the
load-at-create branch untaken.

test_note_refs_once checks that place in precompile_run's source; test_start_progress_at_create's fixture, which cuts that
branch, gets a stub of the kept state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge main 89c3d21e into perf/note-refs-once
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 8s
Third-party parts / As their notes say (pull_request) Successful in 13s
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
CI / Website build and checks (pull_request) Failing after 3m5s
PR description / Description follows the template (pull_request_target) Successful in 5s
beanstalk/linux+radv 1/1 pass
beanstalk/approval approved by klimovich008 (reviewed)
beanstalk/linux+nvidia 2/1 pass
beanstalk/windows+nvidia+vram-ge6gb 1/1 pass
cefaf33d20
No conflicts. Main's #1844 (the load at create lets shader modules go) changed precompile_at_create's body after the references are taken; the references reach programs_index and the workers' notes_of as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D: 34 alternating starts into Hyrule Field (17 with main's renderer, 17 with this PR's, over main 0de25c3e). Every PR start logged one walk of the notes file; the load-at-create line went from 276-323 ms to 19-26 ms, 'the shaders took' from 4.3 s to 4.0 s (medians, warm starts). Game clock 0.998-1.002, no new error lines, the notes file byte-identical after every start. Two starts (one a side) ran the warm pass first, as after an update: one walk on the PR side.

Tested in game: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D: 34 alternating starts into Hyrule Field (17 with main's renderer, 17 with this PR's, over main 0de25c3e). Every PR start logged one walk of the notes file; the load-at-create line went from 276-323 ms to 19-26 ms, 'the shaders took' from 4.3 s to 4.0 s (medians, warm starts). Game clock 0.998-1.002, no new error lines, the notes file byte-identical after every start. Two starts (one a side) ran the warm pass first, as after an update: one walk on the PR side.
Author
Member

@Beanstalk Start-up time, this PR against main: the PR reads the pipeline notes file once a start instead of twice, about 0.28 s less on an RX 9070 XT with AMD's Windows driver. Nothing changes in play. What this PC can't show: Linux and NVIDIA.

  • Targets: Linux with NVIDIA, Linux with AMD (RADV), Windows with NVIDIA (vram_gb = ">= 6" on Windows targets), as many as are free.
  • One scenario from kokiri-start, uncapped and windowed: frame_rate_cap = 6, vsync = 2, frame_generation = 0, fullscreen = 0. wait_s = 10 before the teleport to Hyrule Field, timeout_s = 120 on its map wait, then measure 20 s.
  • 2 starts a side (main and this PR, alternating).
  • Probes: boot_time and shader_compile (the start's vk: precompile: seconds) are what this PR changes. Also a log_value of the load-at-create line's milliseconds (load at create \(RX_VK_LOAD=create\).*; in (\d+) ms), which holds main's second walk.
  • Pass rules: no crash or hang. boot_time_s, shader_compile_s, fps_mean, frametime_p99_ms, run_hitch_count and run_frametime_max_ms are report-only (one start's time is noisy, and play should be unchanged).
@Beanstalk Start-up time, this PR against main: the PR reads the pipeline notes file once a start instead of twice, about 0.28 s less on an RX 9070 XT with AMD's Windows driver. Nothing changes in play. What this PC can't show: Linux and NVIDIA. - Targets: Linux with NVIDIA, Linux with AMD (RADV), Windows with NVIDIA (`vram_gb = ">= 6"` on Windows targets), as many as are free. - One scenario from `kokiri-start`, uncapped and windowed: `frame_rate_cap = 6`, `vsync = 2`, `frame_generation = 0`, `fullscreen = 0`. `wait_s = 10` before the teleport to Hyrule Field, `timeout_s = 120` on its map wait, then measure 20 s. - 2 starts a side (main and this PR, alternating). - Probes: `boot_time` and `shader_compile` (the start's `vk: precompile:` seconds) are what this PR changes. Also a `log_value` of the load-at-create line's milliseconds (`load at create \(RX_VK_LOAD=create\).*; in (\d+) ms`), which holds main's second walk. - Pass rules: no crash or hang. `boot_time_s`, `shader_compile_s`, `fps_mean`, `frametime_p99_ms`, `run_hitch_count` and `run_frametime_max_ms` are report-only (one start's time is noisy, and play should be unchanged).
Member

Beanstalk test farm · ✅ passed on every target

Commit cefaf33 · approved by klimovich008 (reviewed) · dashboard

Summary, written by AI (gpt-6.1-terra) from the numbers below:

The change passed on Linux NVIDIA, Linux RADV and Windows NVIDIA; these tests had no performance thresholds. On the Linux GTX 1070, field frame time p99 worsened from 23.66 to 24.88 ms (+5.2%); on RADV, p99 rose from 21.00 to 21.18 ms (+0.9%), while maximum field frame time rose from 28.26 to 67.63 ms and one field hitch was recorded. On the Windows RTX 3090, p99 was essentially unchanged at 13.63 → 13.65 ms, while load-at-create fell from 287 to 21 ms. A separate Windows RTX 4080 report failed during the baseline build before the game ran, indicating a PC-specific build problem rather than a candidate gameplay failure.

Done (started 14:01 UTC, last report 14:55 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
linux+nvidia ✅ pass (an outlier) 2 1 2 17.2 → 17.8 (+3%) — none
linux+radv ✅ pass 1 1 21.0 → 21.2 (+1%) — none
windows+nvidia+vram-ge6gb (6 GB VRAM or more) ✅ pass 2 1 2 13.6 → 13.6 (+0%) — none

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • windows+nvidia+vram-ge6gb, report 1: the main base failed (exit 1): build.py stopped (exit status 1): fatal error: too many errors emitted, stopping now [-ferror-limit=]
What was tested

What will be tested · AI plan (gpt-6.1-terra)

Compare two alternating starts per side on Linux NVIDIA, Linux RADV and Windows NVIDIA PCs, then teleport from Kokiri Forest to Hyrule Field. Each tester takes about 22 minutes; startup, shader preparation, load-at-create time and gameplay frame metrics are reported without performance thresholds. A crash or failure to reach Hyrule Field within the timeout fails the test. Matching hardware must be available for each target; otherwise that target waits.

  • Where: linux+nvidia (1-2 reports), linux+radv (1-2 reports), windows+nvidia+vram-ge6gb (6 GB VRAM or more, 1-2 reports).
  • startup-field: from the repository's save kokiri-start (settings vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 20 s (after 10 s warm-up); 2 runs on each side.
  • Measured: crashes, boot time, shader preparation at start, frame times, stutters and hitches, draws and frame rate, numbers from the game's log.
  • The PR fails if: it crashes.
  • Time: about 23 min of game runs per tester (4 game starts), plus the two builds.
Measurements on `linux+nvidia`, for the PR description

Verdict: pass on linux+nvidia (2/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce GTX 1070, 580.196.7 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 615.71.9 AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 89c3d21 After: this PR @ cefaf33
startup-field · field · frame time (p99) (ms) 17.2 17.8 (+3%)

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** pass on linux+nvidia (2/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 580.196.7` `Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 615.71.9` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`  
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 89c3d21 | After: this PR @ cefaf33 |
|---|---|---|
| startup-field · field · frame time (p99) (ms) | 17.2 | 17.8 (+3%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
Measurements on `linux+radv`, for the PR description

Verdict: pass on linux+radv (1/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu AMD Steam Machine (RADV NAVI33), 26.1.99 AMD Custom CPU 1772, 16 GB RAM
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 89c3d21 After: this PR @ cefaf33
startup-field · field · frame time (p99) (ms) 21.0 21.2 (+1%)

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** pass on linux+radv (1/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM`  
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 89c3d21 | After: this PR @ cefaf33 |
|---|---|---|
| startup-field · field · frame time (p99) (ms) | 21.0 | 21.2 (+1%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
Measurements on `windows+nvidia+vram-ge6gb`, for the PR description

Verdict: pass on windows+nvidia+vram-ge6gb (2/1 report): no rule failed and no PR run crashed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4080, 621.1.0 AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 89c3d21 After: this PR @ cefaf33
startup-field · field · frame time (p99) (ms) 13.6 13.6 (+0%)

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** pass on windows+nvidia+vram-ge6gb (2/1 report): no rule failed and no PR run crashed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4080, 621.1.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM`  
Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 89c3d21 | After: this PR @ cefaf33 |
|---|---|---|
| startup-field · field · frame time (p99) (ms) | 13.6 | 13.6 (+0%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
linux+nvidia 1 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce GTX 1070, 580.196.7 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM
linux+nvidia 2 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 615.71.9 AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM
linux+radv 1 linux+amd+radv+dgpu AMD Steam Machine (RADV NAVI33), 26.1.99 AMD Custom CPU 1772, 16 GB RAM
windows+nvidia+vram-ge6gb 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4080, 621.1.0 AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM
windows+nvidia+vram-ge6gb 2 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM
<!-- beanstalk:sticky --> ### Beanstalk test farm · ✅ passed on every target Commit `cefaf33` · approved by klimovich008 (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/1873) > **Summary**, written by AI (`gpt-6.1-terra`) from the numbers below: > > The change passed on Linux NVIDIA, Linux RADV and Windows NVIDIA; these tests had no performance thresholds. On the Linux GTX 1070, field frame time p99 worsened from 23.66 to 24.88 ms (+5.2%); on RADV, p99 rose from 21.00 to 21.18 ms (+0.9%), while maximum field frame time rose from 28.26 to 67.63 ms and one field hitch was recorded. On the Windows RTX 3090, p99 was essentially unchanged at 13.63 → 13.65 ms, while load-at-create fell from 287 to 21 ms. A separate Windows RTX 4080 report failed during the baseline build before the game ran, indicating a PC-specific build problem rather than a candidate gameplay failure. Done (started 14:01 UTC, last report 14:55 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `linux+nvidia` | ✅ pass (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_a723f9e4a05d5bea) [2](https://beanstalk.magicbean.dev/reports/rp_2c0bd8afb270d731) | 17.2 → 17.8 (+3%) | — | none | | `linux+radv` | ✅ pass | 1 [1](https://beanstalk.magicbean.dev/reports/rp_8df7ec4cbef3f6da) | 21.0 → 21.2 (+1%) | — | none | | `windows+nvidia+vram-ge6gb` (6 GB VRAM or more) | ✅ pass | 2 [1](https://beanstalk.magicbean.dev/reports/rp_a4df5a2c5215f9e9) [2](https://beanstalk.magicbean.dev/reports/rp_e9712ff617aa30e4) | 13.6 → 13.6 (+0%) | — | none | **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `windows+nvidia+vram-ge6gb`, [report 1](https://beanstalk.magicbean.dev/reports/rp_a4df5a2c5215f9e9): `the main base failed (exit 1): build.py stopped (exit status 1): fatal error: too many errors emitted, stopping now [-ferror-limit=]` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) Compare two alternating starts per side on Linux NVIDIA, Linux RADV and Windows NVIDIA PCs, then teleport from Kokiri Forest to Hyrule Field. Each tester takes about 22 minutes; startup, shader preparation, load-at-create time and gameplay frame metrics are reported without performance thresholds. A crash or failure to reach Hyrule Field within the timeout fails the test. Matching hardware must be available for each target; otherwise that target waits. - **Where:** linux+nvidia (1-2 reports), linux+radv (1-2 reports), windows+nvidia+vram-ge6gb (6 GB VRAM or more, 1-2 reports). - **startup-field:** from the repository's save `kokiri-start` (settings vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 20 s (after 10 s warm-up); 2 runs on each side. - **Measured:** crashes, boot time, shader preparation at start, frame times, stutters and hitches, draws and frame rate, numbers from the game's log. - **The PR fails if:** it crashes. - **Time:** about 23 min of game runs per tester (4 game starts), plus the two builds. </details> <details><summary>Measurements on `linux+nvidia`, for the PR description</summary> **Verdict:** pass on linux+nvidia (2/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 580.196.7` `Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 615.71.9` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 17.2 | 17.8 (+3%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on linux+nvidia (2/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 580.196.7` `Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 615.71.9` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 17.2 | 17.8 (+3%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `linux+radv`, for the PR description</summary> **Verdict:** pass on linux+radv (1/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 21.0 | 21.2 (+1%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on linux+radv (1/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 21.0 | 21.2 (+1%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `windows+nvidia+vram-ge6gb`, for the PR description</summary> **Verdict:** pass on windows+nvidia+vram-ge6gb (2/1 report): no rule failed and no PR run crashed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4080, 621.1.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 13.6 | 13.6 (+0%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on windows+nvidia+vram-ge6gb (2/1 report): no rule failed and no PR run crashed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4080, 621.1.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` Scene: startup-field, from the repository's save kokiri-start (vsync=2, fullscreen=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); startup-field: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 89c3d21 | After: this PR @ cefaf33 | |---|---|---| | startup-field · field · frame time (p99) (ms) | 13.6 | 13.6 (+0%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `linux+nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_a723f9e4a05d5bea) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 580.196.7` `Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 32 GB RAM` | | `linux+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_2c0bd8afb270d731) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 615.71.9` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_8df7ec4cbef3f6da) | linux+amd+radv+dgpu `AMD Steam Machine (RADV NAVI33), 26.1.99` `AMD Custom CPU 1772, 16 GB RAM` | | `windows+nvidia+vram-ge6gb` | [1](https://beanstalk.magicbean.dev/reports/rp_a4df5a2c5215f9e9) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4080, 621.1.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 32 GB RAM` | | `windows+nvidia+vram-ge6gb` | [2](https://beanstalk.magicbean.dev/reports/rp_e9712ff617aa30e4) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` | </details>
Author
Member

🤖 The Test Farm's start-up numbers, from the reports (main 89c3d21e vs this PR cefaf33d, 2 starts a side, alternating main, PR, PR, main; one start each per cell, so n=1). "1st" is each side's first start (main 0, PR 1), "2nd" the second (PR 2, main 3).

Target boot_time_s 1st / 2nd, main → PR shader_compile_s 1st / 2nd, main → PR load-at-create line, ms, 1st / 2nd, main → PR
Linux, GTX 1070 (rp_a723f9e4a05d5bea) 342.6 → 352.3 / 105.8 → 102.7 315.6 → 324.6 / 81.7 → 80.9 245,064 → 254,424 / 4,529 → 4,284
Linux, RTX 4070 (rp_2c0bd8afb270d731) 851.0 → 853.3 / 396.2 → 397.0 810.7 → 812.1 / 378.0 → 377.5 445 → 14 / not logged
Linux RADV, Steam Machine NAVI33 (rp_8df7ec4cbef3f6da) 84.6 → 84.0 / 25.1 → 24.0 62.6 → 62.4 / 0.55 → 0.46 54,997 → 54,679 / 545 → 461
Windows, RTX 3090 (rp_e9712ff617aa30e4) 434.2 → 414.5 / 358.8 → 353.3 410.0 → 391.4 / 338.0 → 334.7 287 → 21 / not logged
Windows, RTX 4080 (rp_a4df5a2c5215f9e9) no runs: main's build failed on that tester ("too many errors emitted")
  • Within noise: boot_time and the start's shader seconds. The expected ~0.3 s is far below these starts' spread (the first start compiles pipelines for 60-810 s, and the sides differ by up to 20 s either way), so they show neither a gain nor a loss.
  • Where it shows: the load-at-create line on the RTX 4070 (445 → 14 ms) and the RTX 3090 (287 → 21 ms): main's second walk of the notes file is gone, as on the RX 9070 XT here (276-323 → 19-26 ms). On the GTX 1070 and RADV that line's time also holds the pipelines' creation (55-254 s on a first start), so the walk can't be told apart in it.
  • Walks a start: the reports don't show it. The probe kept only the line's milliseconds, and the log excerpt is the end of the PR side's log, so the line's "walked N times" can't be read from the farm.
  • No start crashed or hung; frame times in Hyrule Field as in the sticky comment.
🤖 The Test Farm's start-up numbers, from the reports (main 89c3d21e vs this PR cefaf33d, 2 starts a side, alternating main, PR, PR, main; one start each per cell, so n=1). "1st" is each side's first start (main 0, PR 1), "2nd" the second (PR 2, main 3). | Target | boot_time_s 1st / 2nd, main → PR | shader_compile_s 1st / 2nd, main → PR | load-at-create line, ms, 1st / 2nd, main → PR | |---|---|---|---| | Linux, GTX 1070 ([rp_a723f9e4a05d5bea](https://beanstalk.magicbean.dev/reports/rp_a723f9e4a05d5bea)) | 342.6 → 352.3 / 105.8 → 102.7 | 315.6 → 324.6 / 81.7 → 80.9 | 245,064 → 254,424 / 4,529 → 4,284 | | Linux, RTX 4070 ([rp_2c0bd8afb270d731](https://beanstalk.magicbean.dev/reports/rp_2c0bd8afb270d731)) | 851.0 → 853.3 / 396.2 → 397.0 | 810.7 → 812.1 / 378.0 → 377.5 | **445 → 14** / not logged | | Linux RADV, Steam Machine NAVI33 ([rp_8df7ec4cbef3f6da](https://beanstalk.magicbean.dev/reports/rp_8df7ec4cbef3f6da)) | 84.6 → 84.0 / 25.1 → 24.0 | 62.6 → 62.4 / 0.55 → 0.46 | 54,997 → 54,679 / 545 → 461 | | Windows, RTX 3090 ([rp_e9712ff617aa30e4](https://beanstalk.magicbean.dev/reports/rp_e9712ff617aa30e4)) | 434.2 → 414.5 / 358.8 → 353.3 | 410.0 → 391.4 / 338.0 → 334.7 | **287 → 21** / not logged | | Windows, RTX 4080 ([rp_a4df5a2c5215f9e9](https://beanstalk.magicbean.dev/reports/rp_a4df5a2c5215f9e9)) | no runs: main's build failed on that tester ("too many errors emitted") | | | - **Within noise:** `boot_time` and the start's shader seconds. The expected ~0.3 s is far below these starts' spread (the first start compiles pipelines for 60-810 s, and the sides differ by up to 20 s either way), so they show neither a gain nor a loss. - **Where it shows:** the load-at-create line on the RTX 4070 (445 → 14 ms) and the RTX 3090 (287 → 21 ms): main's second walk of the notes file is gone, as on the RX 9070 XT here (276-323 → 19-26 ms). On the GTX 1070 and RADV that line's time also holds the pipelines' creation (55-254 s on a first start), so the walk can't be told apart in it. - **Walks a start:** the reports don't show it. The probe kept only the line's milliseconds, and the log excerpt is the end of the PR side's log, so the line's "walked N times" can't be read from the farm. - No start crashed or hung; frame times in Hyrule Field as in the sticky comment.
klimovich008 changed title from WIP: perf(vk): a start reads the pipeline notes file once, not twice (about 0.28 s off every start) to perf(vk): a start reads the pipeline notes file once, not twice (about 0.28 s off every start) 2026-11-20 15:50:26 +00:00
HumanBean deleted branch perf/note-refs-once 2026-11-20 17:15:26 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1873
No description provided.