[PR #813] [MERGED] Dedicated server: never mesh sections #2828

Closed
opened 2026-11-02 15:59:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: perf/dedicated-no-mesh


📝 Commits (1)

  • 0f482a4 Dedicated server: never mesh sections

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -2)

📄 Description

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

What

A dedicated server no longer builds chunk meshes. It draws nothing, but its streaming still meshed every section it lit. perf-server-6 measured that at about 1.8 % of worker time.

  • Streaming::mesh was !options.integrated, so the integrated server skipped meshing and the dedicated server (--dedicated) did not.
  • Now neither server meshes. Lighting, generation and sending chunks are unchanged: mesh = false only skips the meshing step after lighting (streaming.rs), as it already did for the integrated server.
  • Nothing a client sees changes: clients mesh what they receive themselves.

Measured (Mac mini M4 Pro, shared with other sessions)

Method:

  • horizon-client --dedicated --nogui, fresh world, seed 1234, view distance 10, offline mode.
  • Spawn: CPU and RSS 15 s after Done (.
  • Then 3 horizon-bots fly outwards (explore, 10 blocks/s) for 60 s: the server's CPU over that time, and its RSS after.
  • Order main / this / main / this. Main is ce571f78.
build spawn CPU spawn RSS CPU with 3 bots, 60 s RSS after
main 14.6 / 13.4 s 977 / 966 MB 50.1 / 46.9 s 1536 / 1611 MB
this 13.1 / 12.5 s 874 / 953 MB 46.9 / 46.4 s 1483 / 1512 MB

The means are:

  • spawn CPU 14.0 → 12.8 s (−9 %);
  • spawn RSS 972 → 914 MB (−6 %);
  • CPU with bots 48.5 → 46.7 s (−4 %);
  • RSS with bots 1574 → 1498 MB (−5 %, the meshes are no longer kept).

Checks

  • tools/parity.py dedicated_server lan: 2 passed, 0 failed.
  • On the integration of this PR with #793, #806, #807, #808 and #809, on ce571f78:
    • cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings: clean;
    • cargo test -p horizon-client --lib: 851 passed;
    • lan_e2e titles, hazards, feedback and commands pass.
  • A full --changed run (89 harnesses, since game.rs changes) was not done for this one-line change. The harnesses that run a dedicated server or LAN guests are the two above.

Needs Ludovic

Nothing.

🤖 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/813 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/dedicated-no-mesh` --- ### 📝 Commits (1) - [`0f482a4`](https://github.com/horizon-rust/horizon/commit/0f482a45c868a8e2cab8803e4fcc8e01411edd8c) Dedicated server: never mesh sections ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What A dedicated server no longer builds chunk meshes. It draws nothing, but its streaming still meshed every section it lit. perf-server-6 measured that at about 1.8 % of worker time. - `Streaming::mesh` was `!options.integrated`, so the integrated server skipped meshing and the dedicated server (`--dedicated`) did not. - Now neither server meshes. Lighting, generation and sending chunks are unchanged: `mesh = false` only skips the meshing step after lighting (`streaming.rs`), as it already did for the integrated server. - Nothing a client sees changes: clients mesh what they receive themselves. ## Measured (Mac mini M4 Pro, shared with other sessions) Method: - `horizon-client --dedicated --nogui`, fresh world, seed 1234, view distance 10, offline mode. - Spawn: CPU and RSS 15 s after `Done (`. - Then 3 `horizon-bots` fly outwards (`explore`, 10 blocks/s) for 60 s: the server's CPU over that time, and its RSS after. - Order main / this / main / this. Main is ce571f78. | build | spawn CPU | spawn RSS | CPU with 3 bots, 60 s | RSS after | |---|---|---|---|---| | main | 14.6 / 13.4 s | 977 / 966 MB | 50.1 / 46.9 s | 1536 / 1611 MB | | **this** | **13.1 / 12.5 s** | **874 / 953 MB** | **46.9 / 46.4 s** | **1483 / 1512 MB** | The means are: - spawn CPU 14.0 → 12.8 s (−9 %); - spawn RSS 972 → 914 MB (−6 %); - CPU with bots 48.5 → 46.7 s (−4 %); - RSS with bots 1574 → 1498 MB (−5 %, the meshes are no longer kept). ## Checks - `tools/parity.py dedicated_server lan`: 2 passed, 0 failed. - On the integration of this PR with #793, #806, #807, #808 and #809, on ce571f78: - `cargo fmt --check` and `cargo clippy --workspace --all-targets -- -D warnings`: clean; - `cargo test -p horizon-client --lib`: 851 passed; - `lan_e2e` `titles`, `hazards`, `feedback` and `commands` pass. - A full `--changed` run (89 harnesses, since `game.rs` changes) was not done for this one-line change. The harnesses that run a dedicated server or LAN guests are the two above. ## Needs Ludovic Nothing. 🤖 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-02 15:59:22 +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#2828
No description provided.