[PR #4271] [MERGED] Dedicated server: parse no item models, which only the item renderer bakes #5531

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

📋 Pull Request Information

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

Base: main ← Head: perf/dedicated-no-item-models


📝 Commits (5)

  • d12fd73 Dedicated server: parse no item models, which only the item renderer bakes
  • fc485bb Merge remote-tracking branch 'origin/main' into perf/dedicated-no-item-models
  • 19eeab4 Merge main into perf/dedicated-no-item-models
  • a01414e Merge remote-tracking branch 'origin/main' into HEAD
  • bcbf367 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

1 file changed (+9 additions, -5 deletions)

View changed files

📝 crates/horizon-client-render/src/assets.rs (+9 -5)

📄 Description

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

Server-next W4, item 4 of the ranked list on plan #3989. Stacked on #4242: the first commit is #4242's; this PR's change is the second commit (d12fd7341). Once #4242 merges, only that commit is left.

A dedicated server still parsed every models/**.json (ParsedModels::load, CuboidModel::from_json on worker threads) to build the item model library, about 7 MB in the combined heap profile. Only ItemRenderer::bake reads that library, when it draws items. On a server, RenderAssets::load_with(…, draws: false) now uses ParsedModels::default(): an empty library, the same one the special-renderer test loads ItemRenderer with.

Unchanged: ItemRenderer's item components (items.json prototypes), which gameplay reads (attack_range in hand.rs, death_protection in totem.rs), and the registry ids. Clients and the integrated server are unchanged too.

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 #4242's head 3a11501e2:

Build Round 1 Round 2 Round 3
#4242 317 MB 319 MB 318 MB
this PR 310 MB 313 MB 309 MB

−7 MB idle. Ready time 3.5–3.6 s, unchanged.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at b1dfde280, both commits, 2 min 52 s)

Check Result
Scope ✅ 3 files, +20 −6
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (45 s)
rustfmt ✅ (4 s)
clippy ✅ (15 s)
tests: horizon-client-render ✅ 574 passed (13 s)
doc tests ✅ 0 passed (3 s)
content root tests ✅ 5 passed (1 min 2 s)
Parity ➖ 109 affected, run in CI (run-parity)

🤖 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/4271 **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-item-models` --- ### 📝 Commits (5) - [`d12fd73`](https://github.com/horizon-rust/horizon/commit/d12fd7341cffc1db893ff7fa4a2a0c333e740cdc) Dedicated server: parse no item models, which only the item renderer bakes - [`fc485bb`](https://github.com/horizon-rust/horizon/commit/fc485bb996b71a81a132cb3c9f898033769761e3) Merge remote-tracking branch 'origin/main' into perf/dedicated-no-item-models - [`19eeab4`](https://github.com/horizon-rust/horizon/commit/19eeab4a2a06de8cf69d9d83d5fa70660cd74ebf) Merge main into perf/dedicated-no-item-models - [`a01414e`](https://github.com/horizon-rust/horizon/commit/a01414e0352f9af45242a68841e74f691c3ed182) Merge remote-tracking branch 'origin/main' into HEAD - [`bcbf367`](https://github.com/horizon-rust/horizon/commit/bcbf367fc69df63cf3e6cd830c346aa9da40b34d) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **1 file changed** (+9 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/assets.rs` (+9 -5) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Server-next W4, item 4 of the ranked list on plan #3989. **Stacked on #4242**: the first commit is #4242's; this PR's change is the second commit (d12fd7341). Once #4242 merges, only that commit is left. A dedicated server still parsed every `models/**.json` (`ParsedModels::load`, `CuboidModel::from_json` on worker threads) to build the item model library, about 7 MB in the combined heap profile. Only `ItemRenderer::bake` reads that library, when it draws items. On a server, `RenderAssets::load_with(…, draws: false)` now uses `ParsedModels::default()`: an empty library, the same one the special-renderer test loads `ItemRenderer` with. Unchanged: `ItemRenderer`'s item components (`items.json` prototypes), which gameplay reads (`attack_range` in `hand.rs`, `death_protection` in `totem.rs`), and the registry ids. Clients and the integrated server are unchanged too. ## 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 #4242's head 3a11501e2: | Build | Round 1 | Round 2 | Round 3 | |---|---|---|---| | #4242 | 317 MB | 319 MB | 318 MB | | this PR | 310 MB | 313 MB | 309 MB | −7 MB idle. Ready time 3.5–3.6 s, unchanged. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at b1dfde280, both commits, 2 min 52 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +20 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (45 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (15 s) | | tests: horizon-client-render | ✅ 574 passed (13 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ✅ 5 passed (1 min 2 s) | | Parity | ➖ 109 affected, run in CI (`run-parity`) | 🤖 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:14 +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#5531
No description provided.