perf(builder): a dump folder's stamp takes its files' sizes and times from the folder listing, not a stat of each file #2969
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
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/Longshot!2969
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:perf/dump-stamp-listing"
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?
Summary
On a PC whose game is a dump folder (extracted
romfs/andexefs/), the launcher can fail Play after a restart with "Longshot's builder did not answer within 10 seconds" (LongshotLauncher#373 and the thread after it).infoand Play's fast check stamp such a game by the size and time of every file underromfs/, and each file was opened by its path for them. On Windows, after a restart, that took 10 to 15 s for tens of thousands of files, and an antivirus program sees every open. This takes the sizes and times from each folder's listing, which already carries them, so no file is opened. The stamp is the same text as before, so no game is built again because of it.Read first:
files_under_with_metadatainbuilder/crates/build-core/src/fsx.rsandgame_stampinbuilder/crates/build-driver/src/play.rs. See LongshotLauncher#373, #390.Testing
Tested: Linux only, game-free, on the two crates:
cargo test -p build-core fsxandcargo test -p build-driver --lib play::pass, andcargo clippy --locked -p build-core -p build-driver --all-targets -- -D warningsis clean. A new test checks that a dump's stamp equals the one made by opening each file, and another that the listing's metadata equalsfs::metadatafor each file (a link followed). Not run in the game, and not run on Windows. Opened with--forceat the request of the person I work for.Still to test:
longshot-builder infobefore and after, expecting the first call to drop from 10 to 15 s to about a second (by hand: the player in LongshotLauncher#373,Measure-Command { .\Longshot.exe info --output json | Out-Null })Measurements
Verdict: not measured. I have no dump-folder game and no Windows PC here; the cause is the likely one, not a confirmed one.
Setup: none run.
495ed9fe5440f8feinfoof a dump folder, cold, WindowsRisks
The stamp text is unchanged, so no game is built again and nothing changes for a player. A revert is enough. A link inside
romfs/is still followed, as before (a dump with links is refused elsewhere).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses. (Only the two crates' tests and Clippy ran; not the workspace.)main, or Measurements says why there is nothing to measure. (Not measured.)third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (The tests pass onmaintoo: they keep the stamp the same; the speed-up has no game-free test.)Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
statof each file`info` and play's fast check stamp a game that is a dump folder by the size and time of every file under romfs/. Each file was opened by its path for them: on a Windows PC that had not read the tree lately that took 10 to 15 s for the launcher's first `info` after a restart ("Longshot's builder did not answer within 10 seconds"). The listing already carries both. The stamp is the same text, so no build is made again for it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>WIP: perf(builder): a dump folder's stamp takes its files' sizes and times from the folder listing, not a stat of each fileto perf(builder): a dump folder's stamp takes its files' sizes and times from the folder listing, not a stat of each file