[GH-ISSUE #6834] Launch into a world: the world data preload starts ~250 ms after the tables it needs are ready #2233

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

Originally created by @Vaspyyy on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6834

Originally assigned to: @Vaspyyy on GitHub.

🤖 Filed by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally.

On a launch that names a world (--world, --quickPlaySingleplayer), preload_launch_world reads the worldgen bundle and prepares the Overworld's decoration. The server's world open (world.make_streaming on "World initialization") waits for that.

The preload only needs the block registry and the biomes. In a startup trace (--world T --seed 1234 --warm), core.assets ends at ~130 ms and core.biomes at ~160 ms. But preload_launch_world is called after load_core returns, at ~400–430 ms, after core.block_models_sprites and core.block_facts (~250 ms each). The world's open then waits ~70–100 ms on the preload (server.world_wait, #6761's steps), even with #6729 and #6824 in.

Proposal: with the game's own resources (no resource pack, since a pack failure reloads core from the vanilla root), call preload_launch_world on core's biomes worker as soon as the biomes are read. The later call stays and does nothing once the preload has started.

Measured (release, Ryzen 7 5800X / RTX 3070 / NVMe, tools/startup_trace.py --world T --seed 1234 --runs 2 --warm, alternating builds, 6 runs each, medians):

upstream/main early preload
world.first_frame 1053 ms 868 ms (−185)
world.view_full 1729 ms 1534 ms (−195)
title.shown 629 ms 614 ms
Originally created by @Vaspyyy on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6834 Originally assigned to: @Vaspyyy on GitHub. > 🤖 Filed by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally. On a launch that names a world (`--world`, `--quickPlaySingleplayer`), `preload_launch_world` reads the worldgen bundle and prepares the Overworld's decoration. The server's world open (`world.make_streaming` on "World initialization") waits for that. The preload only needs the block registry and the biomes. In a startup trace (`--world T --seed 1234 --warm`), `core.assets` ends at ~130 ms and `core.biomes` at ~160 ms. But `preload_launch_world` is called after `load_core` returns, at ~400–430 ms, after `core.block_models_sprites` and `core.block_facts` (~250 ms each). The world's open then waits ~70–100 ms on the preload (`server.world_wait`, #6761's steps), even with #6729 and #6824 in. Proposal: with the game's own resources (no resource pack, since a pack failure reloads core from the vanilla root), call `preload_launch_world` on core's biomes worker as soon as the biomes are read. The later call stays and does nothing once the preload has started. Measured (release, Ryzen 7 5800X / RTX 3070 / NVMe, `tools/startup_trace.py --world T --seed 1234 --runs 2 --warm`, alternating builds, 6 runs each, medians): | | upstream/main | early preload | |---|---|---| | world.first_frame | 1053 ms | 868 ms (−185) | | world.view_full | 1729 ms | 1534 ms (−195) | | title.shown | 629 ms | 614 ms |
Author
Owner

@Vaspyyy commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6571055451 --> @Vaspyyy commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
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#2233
No description provided.