perf(build): keep unchanged button prompts in packaged builds too #314
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!314
Loading…
Reference in a new issue
No description provided.
Delete branch "gab9281/Longshot:perf/prompt-cache-packaged"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Every build from a packaged builder (the launcher's, players' builds) drew the button prompts of the other controllers again, even when nothing they are made from changed: about two minutes of the finish stage, each time. Source-checkout builds already kept them (
46780503).What changed
nx2/make_game.pypasses--incrementaltoprompt_assets.pyin every build, packaged or not.prompt_key()innx2/prompt_assets.pyalso covers:host/prompts.c, the game's side that makes the runtime files from the prompts. A kept set now keeps those runtime files too, and they are no longer removed under a game running from the folder.builder_release():version.txt, or the AppImage'sVERSION; none in a source checkout). The first build after a builder update draws them again, whatever the input list misses.--incrementalis now "a direct run of prompt_assets.py".tests/test_prompt_skip.py:--incremental.docs/development.md(when the prompts are kept), and two rows indocs/tested-configurations.md.Flags and settings
None.
LONGSHOT_FORCE_PROMPTS=1still draws them again, as before.Measurements
main:
514591a3(2026-11-13)this PR: perf/prompt-cache-packaged @
b7faba3f(6c16f8da, the head, adds only the docs rows)Hardware: NVIDIA GeForce RTX 3060 Laptop GPU (6 GB), NVIDIA 620.70.06, AMD Ryzen 7 6800H, 15 GB, CachyOS (Linux 7.3.3), KDE Wayland
Scene: no game. A packaged builder: the AppImage's AppRun stand-in,
LONGSHOT_TOOLSset. An--updateof a built game folder with nothing changed,--no-prepare-shaders.Method:
where the time wentlines.How to reproduce: build a game folder with each commit's packaged builder, then run
make_game.py --updateon it twice with nothing changed. Read theprompts:line and the finish stage.514591a3b7faba3fTesting
Tested:
python -I -B tests/run_all.pyon Linux: 517 passed, 1 failed, 15 skipped (with the Vulkan and SPIR-V headers; the skips are Windows-only checks and one needing an offscreen Vulkan 1.3 device).test_menu_i18nfails on main @514591a3too.tests/test_prompt_skip.py: 41 tests pass.prompts: now <face> textures … icons in texts). The game ran on the lightest settings, because this 15 GB laptop ran out of memory twice on the default ones.Not tested:
version.txtis next tonx2/.Needs other testers:
prompts: unchanged, keptand a finish stage under 20 s, then the faces still switch in the game (T-Z5M2).Screenshots
Nothing on screen: the prompts drawn are the same files; only when they are drawn changes.
Risk and rollback
A kept set could be stale if something the prompts are made from is missing from the stamp. The builder's release in the stamp limits that to one builder release.
LONGSHOT_FORCE_PROMPTS=1draws them again. Reverting the commits is enough.Reviewer notes
Start with
prompt_key()andmake_prompts()innx2/prompt_assets.py. One thing is unchanged on purpose: on a miss, the inputs are hashed again after drawing (a few seconds against a minute or two of drawing), so an input that changed during the drawing is never stamped.Issues
None: a follow-up to
46780503, which kept them in source-checkout builds.Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
https://claude.ai/code/session_015KgSKoUqUvce5UXG89NBgi
WIP: perf(build): keep unchanged button prompts in packaged builds tooto perf(build): keep unchanged button prompts in packaged builds tooRead head
6c16f8da, all five changed files, the packaging paths and runtime prompt readers; ran the cache tests on this head and against maincf605c85, the font-mapping check with GCC and Clang, and the AppImage-font and guide-line checks. No game or full build was run.What's good
--incrementalwhen it installs a packaged launcher. This change reaches the existing cache path rather than adding a second one. Both package formats carryhost/prompts.cand the release file where the new key looks for them.host/prompts.cinvalidation and retained runtime files. The tests distinguish the change from main.Needed before it can merge
docs/tested-configurations.mdlines 17–18 are the only conflicting hunk against maincf605c85: both sides inserted results at the start of the table. Main has also frozen that table and moved new results todocs/tested/. Rebase, leave the existing rows and catalogue links intact, and put these four measured builds in separate self-contained run files followingdocs/tested/README.md, withoutas above. A clean merge and a passingtests/test_tested_configurations.pywould settle this. The Python changes merge without a textual conflict; I found no separate functional defect in them.Smaller points
prompts: unchanged, keptas the expected cache result and ask the tester to report the time. The finish stage also copies the built files and does other work.Not checked
No packaged Windows build, game, real controller, live face change or full suite was run here. The source-check jobs on this head were skipped, not passed: https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/2673. The Windows request remains useful, especially for the
version.txtpath and a second build of the same folder.I checked the measurement arithmetic, not the original build logs or machine load. The description's unresolved R1/R2 observation cannot establish a regression without the same check on main. The reason for requesting changes is the merge and run-record migration above, not an observed prompt-rendering failure.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.