Game: stutter at the Castle Town fountain on quick direction changes: Hyrule Field and Hyrule Castle are loaded ahead and dropped again at every turn (related: #996, #1639) #1831

Open
opened 2026-11-20 03:00:34 +00:00 by magicbeanenjoyerguyperson · 3 comments

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=1 the log shows no file opened while I stand still, and about 2,500 a second during the flips:

  • The four area files Banc/HyruleField/HyruleField_Child_Static and _Dynamic.bcett.byml.zs and Banc/HyruleCastle/HyruleCastle_Static and _Dynamic.bcett.byml.zs are opened again about twice a second (36 and 25 times each in 15 s).
  • Their actor packs, models, textures and effects come with them every time: 37,421 opens in 14.9 s of only 1,782 different files, nearly all of them opened many times, up to 63.
  • Pack/Actor/ChangeBancBeforehandAnchor.pack.zs is among the most opened, and the thread OptimizeChangeBanc is 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.
  • The loading threads go from nothing to about two cores between them (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%).
  • Waits for a virtual core (the 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.
  • In the frame record (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>,60 sleeps in every file read once the game has run a minute (read_at in host/nn_fs.c). The same flips at the same spot with it:

Run Read delay Recorder Standing Flips Frames over 16.7 ms Frames over 22 ms File opens
1 none none 106 fps 65 fps no frame record no frame record 2,414 a second
2 1 ms none 102 fps 83 fps 4.9% 0.9 a second 835 a second
3 4 ms none 105 fps 91 fps no frame record no frame record 375 a second
A, no_read_delay_clip.mp4 none OBS 96 fps 64 fps 26.2% 4.6 a second 2,512 a second
B, 4ms_read_delay_clip.mp4 4 ms OBS 97 fps 81 fps 3.4% 0.7 a second 366 a second

With 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.

  • This is my own build of the v3.0.0 tag. My changes are listed below, and none of them touches file reading, loading or thread scheduling. I have not run the project's release build or a nightly.
  • One PC, one spot, child Link by day. I have not traced other spots in the market or other towns.

Related.

  • #996 (running short circles in one corner of the market) looks like the same thing at another spot. A run there with HOS_FS_TRACE=1 would tell: look for fs: OpenFile(content:/Banc/... lines coming back while circling. For me a restart does not clear it, as said above.
  • #1639 (stutter in the Castle Town market and at the Temple of Time on several PCs, no cause established): this may be one of its causes. Its steps mention running toward and back from nearby areas, and one report there (v3.0.0, 19 November) has long waits for a core during Market hitches from threads that may use core 1 only. My log has the same lines during the flips, and none standing still.
  • #597 (rough frame times in the market by day as child Link at 4K): the same place.
  • #1553 ("reduce Market frame stalls and Vulkan capture overhead") is in v3.0.0 and names the workers waiting for a virtual core and the resource decompression. This report adds what sets them off at this spot.
  • #1646 (FreeAddressRegion and its virtual core): going by its title it may be the other end of this. What is loaded ahead here is let go again at every turn.

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

  • Graphics: Output resolution 3840x2160, Fullscreen on. Upscaler NVIDIA DLSS, DLSS model Transformer 2 (M), Render resolution Quality (2560x1440), Sharpness 80, DLAA before the bloom on. Frame generation off. Game frame rate cap 240, NVIDIA Reflex On + Boost, V-Sync off. HDR Expanded, paper white 280 nits. Shadow resolution Highest. Debug tab: Sampler cache on. FPS counter on.
  • I normally play with DLAA. It costs more overall, so the dips go lower. The stutter is the same in kind.
  • This is my own build from source (the v3.0.0 tag) with a few changes of my own: button mapping and prompt options, hold to quit, a hold at 60 fps for the game's scenes (off during the measured stretches, by the log), and one more case of the hidden-mesh rule (#1529). None of them touches file reading, loading or thread scheduling.
  • longshot_env.txt: HOS_DISCORD=0 and HOS_CRASH_WATCH=0. For these runs also RX_VK_FRAME_TRACE=1, HOS_THREAD_TIMES=2 and HOS_FS_TRACE=1, and in the runs with a delay HOS_FS_DELAY_MS=1,60 or HOS_FS_DELAY_MS=4,60.
  • No ReShade, shader-cache tool or injector. Xbox Game Bar enabled. Runs A and B were recorded with OBS, runs 1 to 3 had no recorder.

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.txt and run-20261119-210057-longshot_frames.csv: run A, no read delay (the clip no_read_delay_clip.mp4).
  • run-20261119-210307-longshot_log.txt and run-20261119-210307-longshot_frames.csv: run B, HOS_FS_DELAY_MS=4,60 (the clip 4ms_read_delay_clip.mp4).
  • longshot_log-town-flips-no-delay.txt: run 1.
  • longshot_log-town-flips-read-delay-1ms.txt and longshot_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

  • The problem is still there on the newest release or nightly.
  • I searched the open issues for it.
  • I'm not attaching game files, keys, the game's executable, its .bin caches or saves.
### 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=1` the log shows no file opened while I stand still, and about 2,500 a second during the flips: - The four area files `Banc/HyruleField/HyruleField_Child_Static` and `_Dynamic.bcett.byml.zs` and `Banc/HyruleCastle/HyruleCastle_Static` and `_Dynamic.bcett.byml.zs` are opened again about twice a second (36 and 25 times each in 15 s). - Their actor packs, models, textures and effects come with them every time: 37,421 opens in 14.9 s of only 1,782 different files, nearly all of them opened many times, up to 63. - `Pack/Actor/ChangeBancBeforehandAnchor.pack.zs` is among the most opened, and the thread `OptimizeChangeBanc` is 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. - The loading threads go from nothing to about two cores between them (`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%). - Waits for a virtual core (the `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. - In the frame record (`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>,60` sleeps in every file read once the game has run a minute (`read_at` in `host/nn_fs.c`). The same flips at the same spot with it: | Run | Read delay | Recorder | Standing | Flips | Frames over 16.7 ms | Frames over 22 ms | File opens | |---|---|---|---|---|---|---|---| | 1 | none | none | 106 fps | 65 fps | no frame record | no frame record | 2,414 a second | | 2 | 1 ms | none | 102 fps | 83 fps | 4.9% | 0.9 a second | 835 a second | | 3 | 4 ms | none | 105 fps | 91 fps | no frame record | no frame record | 375 a second | | A, `no_read_delay_clip.mp4` | none | OBS | 96 fps | 64 fps | 26.2% | 4.6 a second | 2,512 a second | | B, `4ms_read_delay_clip.mp4` | 4 ms | OBS | 97 fps | 81 fps | 3.4% | 0.7 a second | 366 a second | With 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.** - This is my own build of the v3.0.0 tag. My changes are listed below, and none of them touches file reading, loading or thread scheduling. I have not run the project's release build or a nightly. - One PC, one spot, child Link by day. I have not traced other spots in the market or other towns. **Related.** - #996 (running short circles in one corner of the market) looks like the same thing at another spot. A run there with `HOS_FS_TRACE=1` would tell: look for `fs: OpenFile(content:/Banc/...` lines coming back while circling. For me a restart does not clear it, as said above. - #1639 (stutter in the Castle Town market and at the Temple of Time on several PCs, no cause established): this may be one of its causes. Its steps mention running toward and back from nearby areas, and one report there (v3.0.0, 19 November) has long waits for a core during Market hitches from threads that may use core 1 only. My log has the same lines during the flips, and none standing still. - #597 (rough frame times in the market by day as child Link at 4K): the same place. - #1553 ("reduce Market frame stalls and Vulkan capture overhead") is in v3.0.0 and names the workers waiting for a virtual core and the resource decompression. This report adds what sets them off at this spot. - #1646 (FreeAddressRegion and its virtual core): going by its title it may be the other end of this. What is loaded ahead here is let go again at every turn. 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 - Graphics: Output resolution 3840x2160, Fullscreen on. Upscaler NVIDIA DLSS, DLSS model Transformer 2 (M), Render resolution Quality (2560x1440), Sharpness 80, DLAA before the bloom on. Frame generation off. Game frame rate cap 240, NVIDIA Reflex On + Boost, V-Sync off. HDR Expanded, paper white 280 nits. Shadow resolution Highest. Debug tab: Sampler cache on. FPS counter on. - I normally play with DLAA. It costs more overall, so the dips go lower. The stutter is the same in kind. - This is my own build from source (the v3.0.0 tag) with a few changes of my own: button mapping and prompt options, hold to quit, a hold at 60 fps for the game's scenes (off during the measured stretches, by the log), and one more case of the hidden-mesh rule (#1529). None of them touches file reading, loading or thread scheduling. - `longshot_env.txt`: `HOS_DISCORD=0` and `HOS_CRASH_WATCH=0`. For these runs also `RX_VK_FRAME_TRACE=1`, `HOS_THREAD_TIMES=2` and `HOS_FS_TRACE=1`, and in the runs with a delay `HOS_FS_DELAY_MS=1,60` or `HOS_FS_DELAY_MS=4,60`. - No ReShade, shader-cache tool or injector. Xbox Game Bar enabled. Runs A and B were recorded with OBS, runs 1 to 3 had no recorder. ### 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.txt` and `run-20261119-210057-longshot_frames.csv`: run A, no read delay (the clip `no_read_delay_clip.mp4`). - `run-20261119-210307-longshot_log.txt` and `run-20261119-210307-longshot_frames.csv`: run B, `HOS_FS_DELAY_MS=4,60` (the clip `4ms_read_delay_clip.mp4`). - `longshot_log-town-flips-no-delay.txt`: run 1. - `longshot_log-town-flips-read-delay-1ms.txt` and `longshot_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 - [x] The problem is still there on the newest release or nightly. - [x] I searched the open issues for it. - [x] I'm not attaching game files, keys, the game's executable, its .bin caches or saves.
Member

Possibly related, for context:

  • PR #1814 perf(host): OoT's OptimizeChangeBank no longer reloads a neighbouring map each time Link turns (HOS_OCB_HOLD_MS) — Open fix targets repeated neighbouring-map preloads on turns at this exact fountain spot.
  • PR #1642 WIP: perf(host): OoT's OptimizeChange thread sleeps 3 ms after each 300 us of running (HOS_BG_THROTTLE) — Open complementary throttle for the same OptimizeChange background work.
  • issue #996 Game: Huge performance hit just running short circles in specific spot of Hyrule Town Market — Related market movement-triggered performance loss at another specific spot.
  • issue #1639 Game: Inconsistent performance and severe stuttering in Hyrule Castle Town / Temple of Time — Broader market stutter report; cause was not established there.
  • PR #1553 perf(runtime): reduce Market frame stalls and Vulkan capture overhead — Merged general Market frame-stall improvements, but does not address this repeated map-loading trigger.
Possibly related, for context: - PR #1814 perf(host): OoT's OptimizeChangeBank no longer reloads a neighbouring map each time Link turns (HOS_OCB_HOLD_MS) — Open fix targets repeated neighbouring-map preloads on turns at this exact fountain spot. - PR #1642 WIP: perf(host): OoT's OptimizeChange thread sleeps 3 ms after each 300 us of running (HOS_BG_THROTTLE) — Open complementary throttle for the same OptimizeChange background work. - issue #996 Game: Huge performance hit just running short circles in specific spot of Hyrule Town Market — Related market movement-triggered performance loss at another specific spot. - issue #1639 Game: Inconsistent performance and severe stuttering in Hyrule Castle Town / Temple of Time — Broader market stutter report; cause was not established there. - PR #1553 perf(runtime): reduce Market frame stalls and Vulkan capture overhead — Merged general Market frame-stall improvements, but does not address this repeated map-loading trigger.
Author

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.

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.
Member

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.

From [Discord](https://discord.com/channels/1569849200047427645/1573461280533258312/1573463072226672640): Additional report from Discord (2026-11-20): <name> 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.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#1831
No description provided.