fix(build): the build's details lay out only the lines in view, and at most five times a second #233
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!233
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/build-log-freeze"
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?
During a build the launcher stops answering: switching the details from Trace back to Info, or just scrolling the log, freezes the window for a minute or more. Each of the build's lines rebuilt and laid out again the whole 2000-line log text on the UI thread, about half a second each, even for lines the chosen level hides.
Fixes #201
Summary
App/Views/BuildStepView.axaml: the details' lines are anItemsControlon aVirtualizingStackPanel(inside the sameLogScroll), oneSelectableTextBlockper line with its coloured prefix, so only the lines in view are laid out. Before, it was oneSelectableTextBlockof 2000 lines × 3 inlines, rebuilt and re-measured whole.App/Views/Views.cs(BuildStepView): aLogTextchange writes the lines at most every 200 ms (oneDispatcherTimer), and not at all when the lines shown are the same (a line the level or search leaves out, the build's 1 s tick). A new level, a search or opening the details still writes at once and goes to the bottom. Following the bottom / staying put when scrolled up is unchanged.tests/launcher_core/LogChecks.cs: checks the virtualized panel and the throttle/skip in the source.Trade-off: text is now selected one line at a time (each line is its own
SelectableTextBlock) rather than across lines; the build report still carries the log.The page looks the same as before (checked with the
build-logscreenshot scene), so no screenshot.Testing
A headless benchmark (Avalonia.Headless, the real
BuildStepViewandBuildStepViewModel, 100,000 lines already in the log, 19 of each 20 debug/trace, lines posted to the UI thread the wayMakeGameRunposts them), on this Linux PC:python -I tests/test_launcher_core.py: 2601 checks passed.LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: 39 of 42 pass; the 3 failures (test_the_bump,test_the_next_stable,test_check_tag_against_the_published_releases) are about git tags in the release script and don't touch any file this PR changes.🤖 Generated with Claude Code