[PR #4027] [MERGED] Dedicated server: no block sprite pixels, which only the renderer reads #5365

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

📋 Pull Request Information

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

Base: main ← Head: perf/dedicated-no-sprite-pixels


📝 Commits (2)

  • ba59ac2 Dedicated server: build only the font atlas, as the integrated server does
  • 10e715b Dedicated server: no block sprite pixels, which only the renderer reads

📊 Changes

5 files changed (+63 additions, -15 deletions)

View changed files

📝 crates/horizon-client-render/src/assets.rs (+13 -1)
📝 crates/horizon-client-render/src/sprites.rs (+14 -0)
📝 crates/horizon-client/src/game.rs (+34 -4)
📝 crates/horizon-client/src/game/integrated.rs (+1 -10)
📝 crates/horizon-client/src/game/startup_menu.rs (+1 -0)

📄 Description

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

What and why

Second PR of the server plan (#3989, docs/server-next.md §7 step 2). Stacked on #4009: its first commit is
#4009's; this PR's change is the second commit (10e715be1). Once #4009 merges, only that commit is left.

A dedicated server still laid out the block sprites' texture array (every layer resampled to one size) and kept
the animated textures' frames. Only the renderer reads them, and a dedicated server has none. It now loads the
block models and the sprites' layers as before (names, sizes, opacity: the model catalog and mesh tables are
unchanged), through Assets::reload_for_server, without the pixels. The integrated server shares the window's
resources and is unchanged; so is every client path.

Measured

sn_idle.py: fresh scratch server, seed 12345, nobody on. Ready = first status ping answered from exec; RSS read
10 s after ready. Mac mini M4 Pro, load ~40; #4009's head (ba59ac2cc) against this branch, 3 interleaved pairs.

run 1 run 2 run 3 median
RSS idle, #4009 784 MB 784 MB 783 MB 784 MB
RSS idle, this PR 660 MB 719 MB 716 MB 716 MB (−68)
Ready, #4009 5.81 s 3.06 s 4.10 s 4.10 s
Ready, this PR 3.73 s 2.92 s 3.14 s 3.14 s (−0.96)

The live heap had 32 MB of texture array and animation frames; the rest of the drop is the resampling's
transient buffers, which the allocator kept. Together with #4009: 836 → 716 MB idle, 5.05 → 3.14 s ready.

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 12930d623, 3 min 34 s)

Check Result
Scope ✅ 5 files, +63 −15
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 475 passed (57 s)
rustfmt ✅ (6 s)
clippy ✅ (19 s)
tests: horizon-client, horizon-client-render ❌ 679 passed, 1 failed (1 min 1 s)
doc tests ✅ 0 passed (1 s)
content root tests ✅ 5 passed (1 min 1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 107 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 95 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The one failing test, entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed, fails on main too. #3851 (DUzzL) fixes it. Parity: run-parity label for CI; dedicated_server also runs locally, and its result follows in 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/4027 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/dedicated-no-sprite-pixels` --- ### 📝 Commits (2) - [`ba59ac2`](https://github.com/horizon-rust/horizon/commit/ba59ac2ccf47820e97707d46118eaccbb9eeab75) Dedicated server: build only the font atlas, as the integrated server does - [`10e715b`](https://github.com/horizon-rust/horizon/commit/10e715be15d2f8944f4947b975ab0309fd1fee7f) Dedicated server: no block sprite pixels, which only the renderer reads ### 📊 Changes **5 files changed** (+63 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/assets.rs` (+13 -1) 📝 `crates/horizon-client-render/src/sprites.rs` (+14 -0) 📝 `crates/horizon-client/src/game.rs` (+34 -4) 📝 `crates/horizon-client/src/game/integrated.rs` (+1 -10) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why Second PR of the server plan (#3989, `docs/server-next.md` §7 step 2). **Stacked on #4009**: its first commit is #4009's; this PR's change is the second commit (10e715be1). Once #4009 merges, only that commit is left. A dedicated server still laid out the block sprites' texture array (every layer resampled to one size) and kept the animated textures' frames. Only the renderer reads them, and a dedicated server has none. It now loads the block models and the sprites' layers as before (names, sizes, opacity: the model catalog and mesh tables are unchanged), through `Assets::reload_for_server`, without the pixels. The integrated server shares the window's resources and is unchanged; so is every client path. ## Measured `sn_idle.py`: fresh scratch server, seed 12345, nobody on. Ready = first status ping answered from exec; RSS read 10 s after ready. Mac mini M4 Pro, load ~40; #4009's head (ba59ac2cc) against this branch, 3 interleaved pairs. | | run 1 | run 2 | run 3 | median | |---|---|---|---|---| | RSS idle, #4009 | 784 MB | 784 MB | 783 MB | 784 MB | | RSS idle, this PR | 660 MB | 719 MB | 716 MB | **716 MB (−68)** | | Ready, #4009 | 5.81 s | 3.06 s | 4.10 s | 4.10 s | | Ready, this PR | 3.73 s | 2.92 s | 3.14 s | **3.14 s (−0.96)** | The live heap had 32 MB of texture array and animation frames; the rest of the drop is the resampling's transient buffers, which the allocator kept. Together with #4009: 836 → 716 MB idle, 5.05 → 3.14 s ready. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 12930d623, 3 min 34 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +63 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 475 passed (57 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (19 s) | | tests: horizon-client, horizon-client-render | ❌ 679 passed, 1 failed (1 min 1 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ✅ 5 passed (1 min 1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 107 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 95 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The one failing test, `entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed`, fails on main too. #3851 (DUzzL) fixes it. Parity: `run-parity` label for CI; `dedicated_server` also runs locally, and its result follows in 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 05:12:05 +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#5365
No description provided.