[PR #1041] [MERGED] Keep the loading UI responsive during local world initialization #3007

Closed
opened 2026-11-02 16:00:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1041
Author: @rdbtCVS
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @ludovic111

Base: main ← Head: t3/move-world-init-off-ui


📝 Commits (1)

  • 7f4193f Move local world initialization off the UI thread

📊 Changes

4 files changed (+463 additions, -162 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+118 -143)
📝 crates/horizon-client/src/game/growth.rs (+27 -18)
📝 crates/horizon-client/src/game/packs.rs (+1 -1)
➕ crates/horizon-client/src/game/world_loading.rs (+317 -0)

📄 Description

Local world opens and reopens prepared saves, loaded generation data and constructed terrain/streaming state on the window thread, freezing the loading screen. Prepare that state on a named worker and publish it to the game only after completion; keep rendering and handling resize, close and Escape while it runs. Direct --world launches enter this path after window handoff too.

Include live feature loading in worker preparation, carry the save lock with the prepared world, and dispose cancelled work off the UI thread before allowing another open. Defer resource-pack reloads until initialization completes. Dedicated servers and the pre-window command harness retain synchronous initialization.

Validation:

  • cargo check -p horizon-client --no-default-features
  • cargo test -p horizon-client --no-default-features --bin horizon-client: 81 passed, 2 ignored, including new nonblocking polling, cancellation and worker failure/panic coverage.
  • python -m unittest discover -s tests -p test_world_input_capture.py: 2 passed.
  • git diff --check

The reported opening timings were not remeasured; interactive rendering was not exercised because this checkout has no prepared worldgen assets.


🔄 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/1041 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/move-world-init-off-ui` --- ### 📝 Commits (1) - [`7f4193f`](https://github.com/horizon-rust/horizon/commit/7f4193f88e61900a68c1054036b665a94812a254) Move local world initialization off the UI thread ### 📊 Changes **4 files changed** (+463 additions, -162 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+118 -143) 📝 `crates/horizon-client/src/game/growth.rs` (+27 -18) 📝 `crates/horizon-client/src/game/packs.rs` (+1 -1) ➕ `crates/horizon-client/src/game/world_loading.rs` (+317 -0) </details> ### 📄 Description Local world opens and reopens prepared saves, loaded generation data and constructed terrain/streaming state on the window thread, freezing the loading screen. Prepare that state on a named worker and publish it to the game only after completion; keep rendering and handling resize, close and Escape while it runs. Direct `--world` launches enter this path after window handoff too. Include live feature loading in worker preparation, carry the save lock with the prepared world, and dispose cancelled work off the UI thread before allowing another open. Defer resource-pack reloads until initialization completes. Dedicated servers and the pre-window command harness retain synchronous initialization. Validation: - `cargo check -p horizon-client --no-default-features` - `cargo test -p horizon-client --no-default-features --bin horizon-client`: 81 passed, 2 ignored, including new nonblocking polling, cancellation and worker failure/panic coverage. - `python -m unittest discover -s tests -p test_world_input_capture.py`: 2 passed. - `git diff --check` The reported opening timings were not remeasured; interactive rendering was not exercised because this checkout has no prepared worldgen assets. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:47 +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#3007
No description provided.