warm: --import another install's pipeline book (keeps every pipeline across builds/forks) #99

Closed
github-bot wants to merge 0 commits from github-bot/gh-99 into main AGit
Owner

@⁠don-ous on GitHub · 2026-12-01 11:39 UTC · original
don-ous:warm-import → main · +221 −2 · 4 files · 23 commits · closed without merging

Why

Most of the stutter is pipelines built the first time a place is seen. victory warm fixes that, but only for pipelines this install has already met. People hop between builds and forks a lot. Each new install starts with an empty book and stutters for hours again, even though the previous install's book already knew those pipelines.

The book holds the title's own records (key, shader stages and hashes, graphics state, shader containers). It means the same in any build. I checked that VIctory-NVIDIA's and victory-amd's books have the same format and identical records for the shaders both had. Merging VIctory-NVIDIA's book by hand gave about 10k extra pipelines here. After a full warm (93,854 pipelines), the freezes went from constant to rare.

Full setup guide and measurements from my PC (frame generation 23 → 50 fps on screen, full warm, freezes from constant to rare): #97

What

victory warm --import <FOLDER>

  • The folder: another install's folder, or its cache\pipelines.
  • What it adds: the shaders, pipelines and early-list keys this install's book does not have.
  • Then: warm makes them like the others. --limit 0 only imports.

How it behaves

  • Torn end: a torn end of this book is cut off first, as the book itself does, so the added records follow whole ones.
  • Order: shaders are written before pipelines.
  • Duplicates: only missing shader hashes, pipeline keys and early keys are added. A second import adds nothing.
  • Bad input: a folder without a book, or this install's own book, is refused.
  • Code: it reuses walk_shaders, walk_pipelines and append_bytes (known::import).

Tests

  • New test: apps/victory/tests/warm_import.rs covers a torn end, an early list without a final newline, a second import, and the refusals.
  • Existing test: warm_bad still passes.

Checks

  • cargo build --release --locked -p victory: no new warnings.
  • cargo test --release -p victory --test warm_import --test warm_bad: both pass.
  • Overlap: #83 also touches warm.rs / known.rs, for a different thing (--library). The two do not overlap in logic, and I will rebase on whichever lands first.

A launcher button ("Import shaders…" with a folder picker) could follow. I left the UI to you, since the button row is full.

🤖 Generated with Claude Code

**@⁠don-ous** on GitHub · 2026-12-01 11:39 UTC · [original](https://github.com/eikkapine/justanxboxemulator/pull/99) `don-ous:warm-import` → `main` · +221 −2 · 4 files · 23 commits · closed without merging ## Why Most of the stutter is pipelines built the first time a place is seen. `victory warm` fixes that, but only for pipelines **this** install has already met. People hop between builds and forks a lot. Each new install starts with an empty book and stutters for hours again, even though the previous install's book already knew those pipelines. The book holds the title's own records (key, shader stages and hashes, graphics state, shader containers). It means the same in any build. I checked that VIctory-NVIDIA's and victory-amd's books have the same format and identical records for the shaders both had. Merging VIctory-NVIDIA's book by hand gave about 10k extra pipelines here. After a full warm (93,854 pipelines), the freezes went from constant to rare. Full setup guide and measurements from my PC (frame generation 23 → 50 fps on screen, full warm, freezes from constant to rare): #97 ## What `victory warm --import <FOLDER>` - **The folder:** another install's folder, or its `cache\pipelines`. - **What it adds:** the shaders, pipelines and early-list keys this install's book does not have. - **Then:** warm makes them like the others. `--limit 0` only imports. ## How it behaves - **Torn end:** a torn end of this book is cut off first, as the book itself does, so the added records follow whole ones. - **Order:** shaders are written before pipelines. - **Duplicates:** only missing shader hashes, pipeline keys and early keys are added. A second import adds nothing. - **Bad input:** a folder without a book, or this install's own book, is refused. - **Code:** it reuses `walk_shaders`, `walk_pipelines` and `append_bytes` (`known::import`). ## Tests - **New test:** `apps/victory/tests/warm_import.rs` covers a torn end, an early list without a final newline, a second import, and the refusals. - **Existing test:** `warm_bad` still passes. ## Checks - `cargo build --release --locked -p victory`: no new warnings. - `cargo test --release -p victory --test warm_import --test warm_bad`: both pass. - **Overlap:** #83 also touches `warm.rs` / `known.rs`, for a different thing (`--library`). The two do not overlap in logic, and I will rebase on whichever lands first. A launcher button ("Import shaders…" with a folder picker) could follow. I left the UI to you, since the button row is full. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds the shaders, pipelines and early keys another install met and this
one does not, so switching builds or forks keeps them; warm then makes
them like the others.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 11:42:23 +00:00
github-bot closed this pull request 2026-12-01 19:52:14 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.