[pr-performance] Dramatically increase build speed by default (-Build release for the full optimisation) #21
Loading…
Reference in a new issue
No description provided.
Delete branch "xrobau/Darner:fast-builder"
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?
What it changes
A release build takes more than 10 minutes, and most of that again after any change. The cargo setting
lto = "fat"withcodegen-units = 1optimises the whole program as one unit, on one core at the end. Building from source to play, try a branch, test a pull request or bisect a crash takes 10+ mins each time.This adds a new fast (default) build option, which (at the potential cost of some performance) dramatically improves compile speed.
Cargo.toml: afastprofile, inheriting release, withlto = false,codegen-units = 256andincremental = true. It builds intotarget\fast, so it does not replace a release build, and the two share the shader cache (the translator's fingerprint covers its source and itsCargo.lockpackages, not the profile).[profile.release]is unchanged.scripts\play-nvidia.ps1:-Build fast). Every start with it prints, in yellow:-Build releasegives the fully optimised build, what the default made before.-Build diagis unchanged.-Buildback to the script, so it keeps the build it was started with, and the log header saysbuild=fastorbuild=release.PLAY_FRAMEGEN.cmdandPLAY_FACES_FIX.cmdalready pass-Build release, so they still use release.darner.exeit starts (Get-D3D12.cmdfills onlytarget\release).-Build releaserow); the Steam and How to run it sections nametarget\fast.How it was tested
mainon git.gtahub.st (4a92569fb) with no conflicts.cargo build --locked --profile fast -p darner: 2 min 40 s from nothing, against 10 min 53 s forcargo build --release --locked -p darnerof the same tree; 0.41 s with nothing changed; 6 s after an edit inapps/darner.target\fast\darner.exe --versionprintsdarner 0.1.0.Cargo.lockunchanged.CARGO_PROFILE_RELEASE_*variables were used to bisect a crash: 2 min 12 s from nothing, then 17 s to 2 min 1 s per step over seven steps.play-nvidia.ps1parses with no errors, and-Builddefaults tofast. Its build block, run on its own: with-Build fastand notarget\fast\darner.exeit rancargo build --locked --profile fast -p darnerand made it; withfastit printed the warning above; withreleaseit printed nothing.cargo xtask policy: 542 files ok. No Rust source changes, so the three cargo gates were not run.target\fastwas not run.Checklist
main.docs/asset-policy.md.Checked for overlap
Dramatically increase build speed by default (-Build release for the full optimisation)to [pr-performance] Dramatically increase build speed by default (-Build release for the full optimisation)darner rig, F1 AUTO-DETECT row, per-start switches (DARNER_AUTO_SWITCHES, on by default, =0 turns it off) #25