[PR #6552] [MERGED] Startup: load the world tables while the handoff's CPU work runs #6949

Closed
opened 2026-11-03 06:30:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6552
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/rest-before-handoff


📝 Commits (1)

  • d5e348e Startup: load the world tables while the handoff's CPU work runs

📊 Changes

1 file changed (+31 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+31 -17)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Stacked on #6496 (startup trace); retargets to main when it merges.

After the core tables, the resource loader prepared the handoff's CPU work (the game's own tables, then the world renderer's texture mips) one after the other, and only then started the world-rest loader (items, recipes, behaviours, mobs, animate tables...). A world can't open before the rest is loaded, so this put the handoff's prep on the path to world entry.

Now the rest loader starts first, and the two handoff jobs run side by side (within the worker budget: one worker keeps them sequential as before). A failure in the handoff's prep waits for the rest loader before returning, so no tail worker outlives its pack-loader generation (the reason the old order existed).

Numbers

playhorizon (EPYC, 4 shared cores, load 15-21, llvmpipe), fast build, start to title + 8 s, 3 alternated pairs, tools/startup_trace.py; times after the core tables finished:

#6496 this PR
rest loader starts +489 / +490 / +583 ms +72 / +64 / +155 ms
rest ready (world can open) +1867 / +1535 / +1917 ms +1651 / +1302 / +1601 ms (−216 / −233 / −316, 3/3)

On 4 shared cores the rest's own steps slow a little beside the handoff jobs; with more cores the gain grows toward the whole old prep (the Mac mini's log shows 392-816 ms for it). The handoff itself is not on the world's path (the rest takes longer).

pr_ready: queued on playhorizon (build slots shared), block follows as a comment.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6552 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/rest-before-handoff` --- ### 📝 Commits (1) - [`d5e348e`](https://github.com/horizon-rust/horizon/commit/d5e348e8e84eb064716500053b49743c5a13a0fe) Startup: load the world tables while the handoff's CPU work runs ### 📊 Changes **1 file changed** (+31 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+31 -17) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #6496 (startup trace); retargets to main when it merges. After the core tables, the resource loader prepared the handoff's CPU work (the game's own tables, then the world renderer's texture mips) one after the other, and only then started the world-rest loader (items, recipes, behaviours, mobs, animate tables...). A world can't open before the rest is loaded, so this put the handoff's prep on the path to world entry. Now the rest loader starts first, and the two handoff jobs run side by side (within the worker budget: one worker keeps them sequential as before). A failure in the handoff's prep waits for the rest loader before returning, so no tail worker outlives its pack-loader generation (the reason the old order existed). ## Numbers playhorizon (EPYC, 4 shared cores, load 15-21, llvmpipe), fast build, start to title + 8 s, 3 alternated pairs, `tools/startup_trace.py`; times after the core tables finished: | | #6496 | this PR | |---|---|---| | rest loader starts | +489 / +490 / +583 ms | +72 / +64 / +155 ms | | rest ready (world can open) | +1867 / +1535 / +1917 ms | +1651 / +1302 / +1601 ms (−216 / −233 / −316, 3/3) | On 4 shared cores the rest's own steps slow a little beside the handoff jobs; with more cores the gain grows toward the whole old prep (the Mac mini's log shows 392-816 ms for it). The handoff itself is not on the world's path (the rest takes longer). pr_ready: queued on playhorizon (build slots shared), block follows as a comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:30:01 +07:00
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#6949
No description provided.