feat(build): Automatic build workers leave one CPU thread free #89
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!89
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:feat/build-workers-leave-one"
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?
With Build workers on Automatic, the build ran one compiler per CPU thread (make_game's own automatic), which can make the PC hard to use while the game builds. Automatic now asks for every thread but one. A number set in Build workers is used as it is.
What changed
Core/SystemInfo.cs: the newAutomaticWorkers()returns the CPU threads less one, and at least 1.App/ViewModels/BuildStepViewModel.cs: the build request passesAutomaticWorkers()when the setting is Automatic. On Linux that is--jobs, and on WindowsLONGSHOT_JOBS, as for a set number. Before, nothing was passed and make_game took every thread.App/ViewModels/SettingsStepViewModel.cs: the Build workers description says "{n-1} of {n} at once" and "{n-1} of {n} workers (automatic)". The time estimate (BuildThreads) uses the same count. The texts are unchanged, only their numbers, so no translation changes.nx2/build.pyMemoryGate), as before.The Beanstalk test farm's agent makes the same change for its builds.
Tested (CachyOS, Linux 7.3)
python -I tests/test_launcher_core.py: 1163 checks passed, including a new check thatAutomaticWorkers()is the threads less one. The App builds (Release), and the lock files are unchanged.python -I tests/test_release.py: OK.Not tested: a real build with it. A build with one worker fewer takes slightly longer on a PC with few threads; on a 4-thread PC that is 3 compilers instead of 4.