Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1831
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Longshot version
v3.0.0-own (source ff155bc2): my own build of the v3.0.0 tag with a few changes of my own
Channel
Built from source
What kind of problem
Low fps or stutter
What happened
What I saw. In the Castle Town market as child Link by day, running left, right, left, right at the fountain and changing direction quickly makes the whole picture hitch. Standing still there I get about 105 fps. During these flips I get about 65 fps, with a quarter of the frames over 16.7 ms and four or five a second over 22 ms. It happens every time and on every pass. My save loads straight into the market and the game was started fresh for every run, and it is there from the first flips.
What I expected. The frame rate I have standing still or walking through the market.
Steps. Load a save in the market (child, day). At the fountain, run left and right and change direction as fast as you can for 15 seconds, then stand still to compare. The fountain is between the way to Hyrule Field and the way to Hyrule Castle.
What the game does there, as far as I could track it. With
HOS_FS_TRACE=1the log shows no file opened while I stand still, and about 2,500 a second during the flips:Banc/HyruleField/HyruleField_Child_Staticand_Dynamic.bcett.byml.zsandBanc/HyruleCastle/HyruleCastle_Staticand_Dynamic.bcett.byml.zsare opened again about twice a second (36 and 25 times each in 15 s).Pack/Actor/ChangeBancBeforehandAnchor.pack.zsis among the most opened, and the threadOptimizeChangeBancis busy. So it looks to me like the game starts loading the two neighbouring areas ahead of time and lets them go again at every turn.HOS_THREAD_TIMES=2, of one core: ARes Loading 80%, OptimizeChangeBanc 55%, ParallelDecompThread 45%, Resource Memory 24%). BaseProcExecutor and ModuleSystemWorker get less (168 to 156% and 69 to 55%).vcores:lines): about 32,000 in 5 s standing, 35 us on average, the longest under 5 ms. During the flips about 120,000 in 5 s, 107 us on average. 42 of them in the 15 s were over 50 ms, up to 148 ms, every one by a background thread that may use core 1 only (tera::FileResourceMgr,PreActorModelCompose,BaseProcCreateAndDeleteThread, the texture compaction). Standing still there is none.RX_VK_FRAME_TRACE=1) the game's side of a frame goes from 5.3 to 12.2 ms. The main thread's own CPU time is 2.2 and 3.2 ms of that, so most of the rise is waiting. The graphics card's time a frame goes from 7.4 to 8.1 ms.My reading: the loading threads take the game's six virtual cores from the frame's workers, and the frame waits for them.
A test that shows it.
HOS_FS_DELAY_MS=<ms>,60sleeps in every file read once the game has run a minute (read_atinhost/nn_fs.c). The same flips at the same spot with it:no_read_delay_clip.mp44ms_read_delay_clip.mp4With 4 ms the area files still come back, but the loading threads take a fraction of what they took (ARes Loading 17%, ParallelDecompThread 5%, Resource Memory 7%; OptimizeChangeBanc stays at 60%), and no wait for a core is over 50 ms. To my eye 50% to 75% of the stutter is gone with it.
The switch is not a fix. It slows every read after the first minute, real loading too. It only shows that the stutter follows this loading.
Ideas, none of them tried yet. Pacing the loading threads' reads while the player is in control (a budget a second in place of a fixed sleep, so loading screens stay fast). Keeping an unpacked file for a while, so the same one is not unpacked again and again. The loaders handing their virtual core back sooner. Or, at the root, the game not starting the same load ahead over and over at one spot.
What I have not tested.
Related.
HOS_FS_TRACE=1would tell: look forfs: OpenFile(content:/Banc/...lines coming back while circling. For me a restart does not clear it, as said above.Found with an AI assistant (Claude). I built and ran everything myself, on one PC.
Where in the game
Castle Town market as child Link by day, at the fountain, running left and right with quick direction changes
How often
Every time
Graphics card and driver version
RTX 5090, NVIDIA 621.24
CPU, RAM and operating system
Ryzen 9 9950X3D, 64 GB, Windows 11
Changes from the defaults
longshot_env.txt:HOS_DISCORD=0andHOS_CRASH_WATCH=0. For these runs alsoRX_VK_FRAME_TRACE=1,HOS_THREAD_TIMES=2andHOS_FS_TRACE=1, and in the runs with a delayHOS_FS_DELAY_MS=1,60orHOS_FS_DELAY_MS=4,60.longshot_log.txt
None of these files names my Windows account. They are as the game wrote them.
town-fountain-important-lines.txt: start here. The lines that matter out of runs A and B, with a short note on each group, and the stretches of all five runs by present number.run-20261119-210057-longshot_log.txtandrun-20261119-210057-longshot_frames.csv: run A, no read delay (the clipno_read_delay_clip.mp4).run-20261119-210307-longshot_log.txtandrun-20261119-210307-longshot_frames.csv: run B,HOS_FS_DELAY_MS=4,60(the clip4ms_read_delay_clip.mp4).longshot_log-town-flips-no-delay.txt: run 1.longshot_log-town-flips-read-delay-1ms.txtandlongshot_frames-town-flips-read-delay-1ms.csv: run 2.longshot_log-town-flips-read-delay-4ms.txt: run 3.Screenshots or video
Both clips are cut from the runs above and show the FPS counter top right. Recorded with OBS at 3840x2160.
no_read_delay_clip.mp4, run A: about 8 seconds standing still at 97 fps, then flips at 60 to 69 fps. The counter's 1% low climbs to 35 ms.4ms_read_delay_clip.mp4, run B,HOS_FS_DELAY_MS=4,60: about 9 seconds standing still at 97 fps, then flips at 76 to 87 fps. The 1% low stays under 26 ms.Before you send it
Possibly related, for context:
The four files of runs 1 to 3, which did not fit in the post:
longshot_log-town-flips-no-delay.txt: run 1, no read delay.
longshot_log-town-flips-read-delay-1ms.txt and longshot_frames-town-flips-read-delay-1ms.csv: run 2, HOS_FS_DELAY_MS=1,60.
longshot_log-town-flips-read-delay-4ms.txt: run 3, HOS_FS_DELAY_MS=4,60.
From Discord:
Additional report from Discord (2026-11-20): reports that when moving all the blue trees into view at the Castle Town fountain, the overlay's “Skipped” count rose to 7 and stayed there. Screenshot shows Longshot Nightly 629 (
a106df16) on Windows, Intel Core i7-14700KF, RTX 4080 SUPER, NVIDIA 621.24, with 60 FPS displayed. The screenshots show the nearby foliage and fountain, but no profiling measurements; please assess whether this is the same repeated neighboring-area loading trigger.