perf(build): skip unchanged links, write compile_commands.json, key the hot pieces by the profile's contents #2893
Open
github-sync wants to merge 1 commit from
github/pr/2893 into main
pull from: github/pr/2893
merge into: Hookshot:main
Hookshot:main
Hookshot:release/v2.2.0-rc.1-forgejo
Hookshot:release/v2.1.0-forgejo
Hookshot:github/pr/2890
Hookshot:github/pr/2887
Hookshot:github/pr/2878
Hookshot:github/pr/2875
Hookshot:github/pr/2874
Hookshot:github/pr/2873
Hookshot:github/pr/2871
Hookshot:github/pr/2756
Hookshot:github/pr/2897
Hookshot:github/pr/2896
Hookshot:github/pr/2718
Hookshot:github/pr/2842
Hookshot:github/pr/2691
Hookshot:github/pr/2895
Hookshot:github/pr/2743
Hookshot:github/pr/2765
Hookshot:github/pr/2708
Hookshot:github/pr/2732
Hookshot:github/pr/2755
Hookshot:github/pr/2817
Hookshot:github/pr/2876
Hookshot:release-please--branches--main
Hookshot:release-please--branches--main--release-notes
Hookshot:github/pr/2778
Hookshot:github/pr/2888
Hookshot:github/pr/2866
Hookshot:github/pr/2877
Hookshot:github/pr/2800
Hookshot:github/pr/2829
Hookshot:github/pr/2850
Hookshot:github/pr/2889
Hookshot:github/pr/2882
Hookshot:github/pr/2860
Hookshot:github/pr/2849
Hookshot:github/pr/2886
Hookshot:github/pr/2794
Hookshot:github/pr/2840
Hookshot:github/pr/2830
Hookshot:github/pr/2834
Hookshot:github/pr/2719
Hookshot:github/pr/2742
Hookshot:github/pr/2741
Hookshot:github/pr/2820
Hookshot:github/pr/2771
Hookshot:github/pr/2859
Hookshot:github/pr/2858
Hookshot:github/pr/2823
Hookshot:github/pr/2757
Hookshot:github/pr/2769
Hookshot:github/pr/2844
Hookshot:github/pr/2843
Hookshot:github/pr/2673
Hookshot:github/pr/2855
Hookshot:github/pr/2739
Hookshot:github/pr/2807
Hookshot:github/pr/2851
Hookshot:github/pr/2789
Hookshot:github/pr/2814
Hookshot:github/pr/2818
Hookshot:github/pr/2774
Hookshot:github/pr/2772
Hookshot:github/pr/2750
Hookshot:github/pr/2786
Hookshot:github/pr/2785
Hookshot:github/pr/2782
Hookshot:github/pr/2779
Hookshot:github/pr/2775
Hookshot:github/pr/2706
Hookshot:github/pr/2766
Hookshot:github/pr/2747
Hookshot:github/pr/2759
Hookshot:github/pr/2745
Hookshot:github/pr/2740
Hookshot:github/pr/2733
Hookshot:github/pr/2725
Hookshot:github/pr/2727
Hookshot:github/pr/2728
Hookshot:github/pr/2729
Hookshot:github/pr/2721
Hookshot:github/pr/2722
Hookshot:github/pr/2715
Hookshot:github/pr/2714
Hookshot:github/pr/2707
Hookshot:github/pr/2703
Hookshot:github/pr/2705
Hookshot:github/pr/2697
Hookshot:github/pr/2679
Hookshot:github/pr/2676
Hookshot:github/pr/2669
Hookshot:docs/what-hookshot-connects-to
Hookshot:fix/hdr-encode-test
Hookshot:fix/main-tests
Hookshot:fix/play-cache-files
Hookshot:perf/game-barrier-order
Hookshot:feat/heap-lazy
Hookshot:feat/texture-detail
Hookshot:perf/astc-opaque-bc1
Hookshot:fix/fs-dir-lock
Hookshot:fix/framegen-native-kept
Hookshot:fix/update-no-downgrade
Hookshot:port/k10-gcn-f16-mirrors
Hookshot:fix/framegen-mult-cap
Hookshot:chore/release-as-2.1.1
Hookshot:perf/pcache-load-switch
Hookshot:fix/prepare-progress-log
Hookshot:fix/update-closes-stale-game
Hookshot:fix/hdr-scaled-sampled
Hookshot:perf/first-start-preset
Hookshot:perf/zero-upload
Hookshot:fix/vcore-escape-2s
Hookshot:test/fake-gh-atomic
Hookshot:perf/batch-idle-flush
Hookshot:test/finish-stub-a
Hookshot:chore/record-2.1.0
Hookshot:fix/main-red-tests
Hookshot:fix/test-display-startup-driver-cache
Hookshot:feat/mesh-shader-mode
Hookshot:fix/menu-probes-at-startup
Hookshot:fix/fps-counter-classic
Hookshot:fix/test-log-batch-flake
Hookshot:fix/narrow-screen-hud
Hookshot:ci/prereleases
Hookshot:release/v2.0.15
Hookshot:hotfix/v2.0.15
Hookshot:fix/present-ahead-replay
Hookshot:release/v2.0.13
Hookshot:fix/bracket-paths-2013
Hookshot:fix/hdr-overlays-2013
Hookshot:fix/fps-counter-scale-2013
Hookshot:fix/stick-seen-at-rest
Hookshot:hotfix/menu-fits-screen
Hookshot:fix/f1-always-opens-menu
Hookshot:fix/ini-keep-lines
Hookshot:claude/cranky-pike-7cf247
Hookshot:perf/texture-answer-flat
Hookshot:fix/stamp-test-modules
Hookshot:fix/appimage-fonts
Hookshot:fix/display-awake
Hookshot:release/v2.0.12
Hookshot:fix/discord-windows
Hookshot:rc/v2.0.12-tests
Hookshot:fix/dlss-keep-feature
Hookshot:rc/v2.0.12
Hookshot:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
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
Hookshot/Hookshot!2893
Loading…
Reference in a new issue
No description provided.
Delete branch "github/pr/2893"
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?
A build with nothing to compile still relinked the 440 MB executable and the renderer, a build from a second checkout of the same tree recompiled all eight hot pieces (~10-20 minutes) because their keys named the play profile by its path, and clangd had no compile database. Three small changes to
nx2/build.pyfrom the dev-loop proposal (#2636, A4 and A8); one PR because they touch the same lines, and I can split them if you prefer.Change
nx2/build.py:A4, no link when nothing changed:
run_linkskips a link whose inputs are the last successful one's. Its key is kept beside the output (<output>.linkkey) with the output's size:.o.sha1; its size and time without one);A failed link, or an output of another size or gone, links again. The executable's, the renderer's and the game DLL's links go through it.
A8,
compile_commands.json: every compile ascompile_oneruns it, written to the build folder for clangd and clang-tidy (compile_commands.jsonat the checkout's top is git-ignored, for a copy there).The hot pieces' keys name the profile by its contents:
flag_textleaves-fprofile-instr-use=<path>out of the key, since-DHOOKSHOT_PROFILE_SHA1beside it already says what the key needs of the profile. This changes their keys once.Measured
Windows 11, Ryzen 9 3900X, a dev work folder:
maincompiled them again.In the game
Every build I ran in the game today used this
build.py. The latest: Windows 11, RTX 3080 (NVIDIA 621.14), a dev-profile build, from a save, headless through the control bridge: in play in Kokiri Forest, 28-31 fps, nothing in the log about a lost device or a crash. A skipped link leaves the same binary in place.Testing
tests/test_link_skip.py(new): a stand-in linker through the realrun_link: the same inputs aren't linked again; a changed object, library or symbol order is; so is an output of another size or gone; a failed link forgets its key; the files inside options are inputs; the compile commands are the compiles; the build's links go through it.tests/test_profile_path_key.py(new): two paths, one profile give one key; another profile, another key; every use of the profile's path names its contents too.run_all.py, rebased on today'smain, Windows: pass, apart from four that fail the same way onmainhere (test_driver_cache_folder,test_fpx_sticky,test_linux_update,nx2/test_dll.py). Rebasing found thatmain'sbuild.pydoesn't importre(#2706 adds it); this PR imports it too.See #2636 (A4, A8).
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.