[PR #4276] [MERGED] Dedicated server: no block entity renderer or animate tables, which only frames read #5538

Closed
opened 2026-11-03 05:13:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4276
Author: @ludovic111
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: perf/dedicated-no-client-tables


📝 Commits (5)

  • 4d42e8b Dedicated server: no block entity renderer or animate tables, which only frames read
  • 69d6254 Merge remote-tracking branch 'origin/main' into perf/dedicated-no-client-tables
  • 52a0865 Merge main into perf/dedicated-no-client-tables
  • 1f3ac39 Merge remote-tracking branch 'origin/main' into HEAD
  • d7c6e36 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

3 files changed (+18 additions, -2 deletions)

View changed files

📝 crates/horizon-client-render/src/block_entity_render.rs (+2 -0)
📝 crates/horizon-client/src/animate_tick.rs (+3 -1)
📝 crates/horizon-client/src/game.rs (+13 -1)

📄 Description

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

Server-next W4, item 5 of the ranked list on plan #3989: client-only tables a dedicated server still loaded. This PR covers the two that only frame code reads:

  • BlockEntityRenderer (entity models, per-state kinds, closed chest geometry): read by entity_geometry and render_tick.
  • AnimateTables (vanilla's animateTick: client display particles and ambient sounds): read only by render_tick.

load_world_rest(…, draws) gets !headless on the non-menu path (dedicated server) and true on the menu path. With draws false, both tables are Default: empty Vecs and maps. Every lookup in both already goes through .get() (kinds.get(state), the AnimateTables per-state gets), so an empty table answers "nothing to draw" instead of panicking. Clients, the integrated server and --world starts are unchanged.

Not in this PR (each needs its own check):

  • the creative screen: Creative::tab() indexes tabs[selected];
  • MeshTables: waits for #4257's FaceVisibility::is_empty;
  • the sound event tables: the server may need the ids.

Idle memory A/B

Dedicated server, --profile fast --no-default-features, on playhorizon (--cpus 0-3 --exclusive). RSS 10 s after the first status ping (sn_idle.py), 3 interleaved rounds against the parent bb6406719:

Build Round 1 Round 2 Round 3
main bb6406719 341 MB 339 MB 338 MB
this PR 334 MB 333 MB 331 MB

−6 MB idle. Ready time 3.7–3.9 s, unchanged.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at bb6406719, 6 min 54 s)

Check Result
Scope ✅ 3 files, +20 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (57 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 44 s)
tests: horizon-client, horizon-client-render ✅ 1546 passed (3 min 50 s)
doc tests ✅ 0 passed (2 s)
Parity ➖ 109 affected, run in CI (run-parity); dedicated_server covers this path

🤖 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/4276 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/dedicated-no-client-tables` --- ### 📝 Commits (5) - [`4d42e8b`](https://github.com/horizon-rust/horizon/commit/4d42e8b877e73bf7f756e64ecca9f6da0c43e4c6) Dedicated server: no block entity renderer or animate tables, which only frames read - [`69d6254`](https://github.com/horizon-rust/horizon/commit/69d6254b70c22f80b930f7355c6e695f4be9b9a6) Merge remote-tracking branch 'origin/main' into perf/dedicated-no-client-tables - [`52a0865`](https://github.com/horizon-rust/horizon/commit/52a0865aacca99e2d290f697e8ff962c016a232d) Merge main into perf/dedicated-no-client-tables - [`1f3ac39`](https://github.com/horizon-rust/horizon/commit/1f3ac390dafcc97d7c6624a8b4f98eb3be5e97e6) Merge remote-tracking branch 'origin/main' into HEAD - [`d7c6e36`](https://github.com/horizon-rust/horizon/commit/d7c6e36cb93ba8a6c7374c9291106fb9773f41d0) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **3 files changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/block_entity_render.rs` (+2 -0) 📝 `crates/horizon-client/src/animate_tick.rs` (+3 -1) 📝 `crates/horizon-client/src/game.rs` (+13 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Server-next W4, item 5 of the ranked list on plan #3989: client-only tables a dedicated server still loaded. This PR covers the two that only frame code reads: - **`BlockEntityRenderer`** (entity models, per-state kinds, closed chest geometry): read by `entity_geometry` and `render_tick`. - **`AnimateTables`** (vanilla's `animateTick`: client display particles and ambient sounds): read only by `render_tick`. `load_world_rest(…, draws)` gets `!headless` on the non-menu path (dedicated server) and `true` on the menu path. With `draws` false, both tables are `Default`: empty `Vec`s and maps. Every lookup in both already goes through `.get()` (`kinds.get(state)`, the `AnimateTables` per-state `get`s), so an empty table answers "nothing to draw" instead of panicking. Clients, the integrated server and `--world` starts are unchanged. Not in this PR (each needs its own check): - the creative screen: `Creative::tab()` indexes `tabs[selected]`; - `MeshTables`: waits for #4257's `FaceVisibility::is_empty`; - the sound event tables: the server may need the ids. ## Idle memory A/B Dedicated server, `--profile fast --no-default-features`, on playhorizon (`--cpus 0-3 --exclusive`). RSS 10 s after the first status ping (`sn_idle.py`), 3 interleaved rounds against the parent bb6406719: | Build | Round 1 | Round 2 | Round 3 | |---|---|---|---| | main bb6406719 | 341 MB | 339 MB | 338 MB | | this PR | 334 MB | 333 MB | 331 MB | −6 MB idle. Ready time 3.7–3.9 s, unchanged. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at bb6406719, 6 min 54 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +20 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (57 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 44 s) | | tests: horizon-client, horizon-client-render | ✅ 1546 passed (3 min 50 s) | | doc tests | ✅ 0 passed (2 s) | | Parity | ➖ 109 affected, run in CI (`run-parity`); `dedicated_server` covers this path | 🤖 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 05:13:16 +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#5538
No description provided.