WIP: perf(build): the Builder runs the build at normal priority, not below it #779
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
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/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!779
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:perf/build-priority"
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?
Type: perf · Risk: low · Tested on: Windows 11 (game-free checks) · Needs: Windows on a hybrid Intel CPU (12th gen or later), a first build
Why
On an Intel CPU with efficiency cores, the first build can take over an hour longer than it should. The Builder starts
make_game.pybelow normal priority, and Windows keeps a below-normal process's single-threaded steps (reading the game, the lift) on the efficiency cores while the performance cores sit idle. Project ReLink, a fork of Longshot, found and fixed this (commits 0a74889c and b98adb9e).What changed
The Builder now runs the build at normal priority.
LONGSHOT_LOW_PRIORITY=1brings back below normal, for a desktop that stays quicker during the build.Runner.Startinbuilder/LongshotBuilder/Runner.cssetsProcessPriorityClass.BelowNormalonmake_game.pyonly whenLONGSHOT_LOW_PRIORITY=1.docs/development.md.tests/test_builder_own_python.pychecks that below normal is only set when the switch asks.Measurements
Not measured here: this PC isn't a hybrid Intel CPU. ReLink's report was over an hour of a first build on the efficiency cores. The numbers to take are a first build's time with and without
LONGSHOT_LOW_PRIORITY=1on such a CPU.Flags and settings
One new build switch.
LONGSHOT_LOW_PRIORITY1: below normal1only to keep the desktop quicker during a buildTesting
Tested:
python -I -B tests/test_builder_own_python.py(with the new check), andtests/run_all.py builder docs: 6 passed, 1 skipped (no clang here).dotnet build builder/LongshotBuilder -c Release: 0 warnings.Not tested:
Must be tested:
LONGSHOT_LOW_PRIORITY=1. Expect the first to be shorter, with the read and the lift on the performance cores in Task Manager (by hand).Risks
What could break: the desktop can feel slower during a build, since the compilers now run at normal priority.
Turning it off:
LONGSHOT_LOW_PRIORITY=1, or revert the commit.Compatibility: nothing changes for a player beyond the build's priority.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). (Not yet: only the checks this touches were run; the full run is left to the testing pass.)third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.