[GH-ISSUE #489] [performance] ~3 s freeze right after a world loads and when returning to the Overworld from the Nether #139

Closed
opened 2026-11-02 15:36:43 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/489

What the player saw

Right after a world loads, the first few chunks show up quickly, then the game freezes for about 3 seconds before the rest of the terrain appears. The F3 frame-time graph in the clip shows a 2,979 ms frame (2 FPS) as the drawn chunks jump from 107 to 761 sections' worth of terrain (C: 107 chunks with 539 pending jobs, then C: 761 chunks).

The same ~3 s freeze happens when going from the Nether back to the Overworld. Entering the Nether only takes about 150 ms.

The player's suggestion: if the work can't be made cheaper, it should at least happen behind the loading screen rather than as an in-game freeze.

Platform: Linux (KDE). Version: a build from main on 2026-10-16 (before #451, the vanilla level loading screen, was merged, so it may now be partly hidden behind that screen; the freeze itself is untested since).

Steps

  1. Open an existing Overworld singleplayer world with F3 open (the frame-time chart visible).
  2. Watch the frame-time chart for the first seconds after the world appears.
  3. Go through a Nether portal and back, and compare the Overworld arrival with the Nether arrival.

What vanilla 26.3 does

LevelLoadingScreen stays up until the chunks around the player are loaded and rendered, and section compiling runs on the section compiler's worker threads, so the game doesn't freeze for seconds once the world is shown.

Source

Reported on Discord by rdbt in #horizon-chat (2026-10-16): "that 3s stutter is horrible tho that should just be covered by a loading screen if it can be fixed", "entering the overworld coming from the nether has the same 3s stutter, entering the nether only takes 150ms".
Clip (Discord CDN link, may expire): https://cdn.discordapp.com/attachments/1559242412121919620/1560443293626535996/Screencast_20261016_010300.webm?ex=6ad2bb90&is=6ad16a10&hm=31d4454bb89b560312004ed08208b0f5e96f028c53a850dd13e08fda38a7a11c&

Originally created by @ludovic111 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/489 ## What the player saw Right after a world loads, the first few chunks show up quickly, then the game freezes for about 3 seconds before the rest of the terrain appears. The F3 frame-time graph in the clip shows a 2,979 ms frame (2 FPS) as the drawn chunks jump from 107 to 761 sections' worth of terrain (`C: 107 chunks` with 539 pending jobs, then `C: 761 chunks`). The same ~3 s freeze happens when going from the Nether back to the Overworld. Entering the Nether only takes about 150 ms. The player's suggestion: if the work can't be made cheaper, it should at least happen behind the loading screen rather than as an in-game freeze. Platform: Linux (KDE). Version: a build from main on 2026-10-16 (before #451, the vanilla level loading screen, was merged, so it may now be partly hidden behind that screen; the freeze itself is untested since). ## Steps 1. Open an existing Overworld singleplayer world with F3 open (the frame-time chart visible). 2. Watch the frame-time chart for the first seconds after the world appears. 3. Go through a Nether portal and back, and compare the Overworld arrival with the Nether arrival. ## What vanilla 26.3 does `LevelLoadingScreen` stays up until the chunks around the player are loaded and rendered, and section compiling runs on the section compiler's worker threads, so the game doesn't freeze for seconds once the world is shown. ## Source Reported on Discord by rdbt in #horizon-chat (2026-10-16): "that 3s stutter is horrible tho that should just be covered by a loading screen if it can be fixed", "entering the overworld coming from the nether has the same 3s stutter, entering the nether only takes 150ms". Clip (Discord CDN link, may expire): https://cdn.discordapp.com/attachments/1559242412121919620/1560443293626535996/Screencast_20261016_010300.webm?ex=6ad2bb90&is=6ad16a10&hm=31d4454bb89b560312004ed08208b0f5e96f028c53a850dd13e08fda38a7a11c&
bsakaguchi 2026-11-02 15:36:43 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ludovic111 commented on GitHub (Oct 21, 2026):

🤖 Agent: re-measured on main (d128289c, after #591, #657, #658, #1041, #1043 and #1042). The ~3 s freeze is gone, so this issue is closed.

How: Mac mini (M4 Pro), --profile fast, offscreen, HORIZON_SPIKES=50 (every frame over 50 ms is logged with its spans). Seed 5862052499468016705: create the world, quit, reopen it (the reported case), wait 10 s, /execute in minecraft:the_nether run tp @s 0 80 0, wait 5 s, then back to the Overworld the same way and wait 10 s. Another session was using 9 of the 14 cores during the runs, so these are upper bounds.

in-frame world --server-thread
Reopen, render distance 12: worst frame 106 ms (16 frames over 50 ms) 76 ms (2 frames over 50 ms)
Nether → Overworld, render distance 12 no frame over 50 ms no frame over 50 ms
Reopen, render distance 32 178 ms (31 over 50 ms) 136 ms (24 over 50 ms)
Nether → Overworld, render distance 32 163 ms (64 over 50 ms) 272 ms (53 over 50 ms)

The reported frame was 2,979 ms. No frame comes near that now. The shorter hitches left at render distance 32 are world ticks on the render thread (tick_mobs, tick_blocks) when the world runs in the frame, which #1072 removes, plus section uploads and encoding (#678's frame-pacing work). If it still freezes for seconds on your Linux machine, please reopen with an F3 screenshot and latest.log.

<!-- gh-comment-id:6319665101 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: re-measured on main (d128289c, after #591, #657, #658, #1041, #1043 and #1042). The ~3 s freeze is gone, so this issue is closed. How: Mac mini (M4 Pro), `--profile fast`, offscreen, `HORIZON_SPIKES=50` (every frame over 50 ms is logged with its spans). Seed 5862052499468016705: create the world, quit, reopen it (the reported case), wait 10 s, `/execute in minecraft:the_nether run tp @s 0 80 0`, wait 5 s, then back to the Overworld the same way and wait 10 s. Another session was using 9 of the 14 cores during the runs, so these are upper bounds. | | in-frame world | `--server-thread` | | --- | --- | --- | | Reopen, render distance 12: worst frame | 106 ms (16 frames over 50 ms) | 76 ms (2 frames over 50 ms) | | Nether → Overworld, render distance 12 | no frame over 50 ms | no frame over 50 ms | | Reopen, render distance 32 | 178 ms (31 over 50 ms) | 136 ms (24 over 50 ms) | | Nether → Overworld, render distance 32 | 163 ms (64 over 50 ms) | 272 ms (53 over 50 ms) | The reported frame was 2,979 ms. No frame comes near that now. The shorter hitches left at render distance 32 are world ticks on the render thread (`tick_mobs`, `tick_blocks`) when the world runs in the frame, which #1072 removes, plus section uploads and encoding (#678's frame-pacing work). If it still freezes for seconds on your Linux machine, please reopen with an F3 screenshot and `latest.log`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
horizon-rust/horizon#139
No description provided.