Release profile: the program optimised as one unit (fat LTO, one codegen unit) #128
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!128
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-128"
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?
@1mosce on GitHub · 2026-11-27 18:31 UTC · original
1mosce:release-lto→main· +5 −0 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCDraft: opened for the idea and the build-time figure; the frame times are not measured yet.
What
The release profile (and
diag, which inherits it) builds the program as one unit:lto = "fat",codegen-units = 1. Nothing else changes; the code does the same.Why
The frame is bound by the processor on the machines I can measure, and the hot paths cross crates: the title's list calls go through
victory-gpuinto the translator and the formats, and the submitting thread's steps are spread overhost,shadow,watchandland. With sixteen codegen units and no link-time optimisation nothing is inlined across those borders but what is marked for it.Session of 2026-11-28, RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS (8 cores, 16 threads), Series S profile: the thread that prepares submissions worked 52 to 54 ms of a 54 to 57 ms frame at 4,000 to 5,000 draws, the card 58 to 79 % busy; the lists' translation took 333 to 494 ms of processor time a frame over its threads.
What it costs
The build. On the same machine a full
cargo build --release --locked -p victorytook 1 min 15 s before (2026-11-27) and 3 min 24 s with this (2026-11-28; other compiles were running beside it, and-C target-cpu=nativewas set locally, so the second figure is on the high side). Everyone who builds at the launcher's first start waits that much longer, once; every rebuild of a changed crate ends in the same whole-program step.If that is too much for the default, a second profile (
[profile.fast] inherits = "release") that the launcher takes with a switch would keep today's build as it is.Not measured
The frame. I have the build and no run with it yet; I will add the submitting thread's and the translation's milliseconds for the same scene with and without it, and mark this ready only if they show something.
🤖 Generated with Claude Code
@meonline42 on GitHub · 2026-11-29 09:18 UTC · original
Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below).
Machine: Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x.
Base:
mainate1f2eb6, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path).Method: each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second
victory_gpu::hostlines by draws per frame.maine1f2eb6VICTORY_PRESENT_QUEUE=1VICTORY_SPANS_QUICK=1, so its default flip made no difference in this run.preparing: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between923e38cande1f2eb6.Posted by Claude Code on behalf of the machine's owner.
@DoubleD17 on GitHub · 2026-11-30 03:37 UTC · original · edited 2026-11-30 09:56 UTC
We ran a test of this profile (fat LTO, one codegen unit) on current main, on a CPU-bound machine (about 66 ms of CPU preparation per frame).
No gain we can measure here (the controls alone spread over 9 ms). The release build took 5 min instead of 1.5 min. The picture was clean (0 defects in 160 frames).
Setup:
41adb551(only its own commits on top), against41adb551itself;41adb551spread through the session;Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame.
AI Assisted