[PR #2799] [MERGED] registries: list the resources' recipe, loot table and template ids once, not at every join #4623

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

📋 Pull Request Information

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

Base: main ← Head: join-without-rescanning-registries


📝 Commits (3)

  • ea7df1d registries: list the resources' recipe, loot table and template ids once, not at every join
  • f1a8cc6 Merge main into join-without-rescanning-registries
  • cf0b111 Merge main into join-without-rescanning-registries

📊 Changes

1 file changed (+89 additions, -56 deletions)

View changed files

📝 crates/horizon-client/src/game/chat.rs (+89 -56)

📄 Description

What and why

Every server join froze the window for 260–400 ms before "Connecting": build_registries walked about 5,000 recipe, loot table and structure files, with a metadata call for each. The walk now uses each directory entry's own type and runs once per resources root: 30 ms the first time, 0 after (measured joining a server three times).

Vanilla reference

None: these are the ids Horizon's command arguments suggest; they are unchanged.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 12e0094f1, 3 min 34 s)

Check Result
Scope ✅ 8 files, +136 −56
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 331 run, FAILED (failures=2, errors=8, skipped=11) (48 s)
rustfmt ✅ (9 s)
clippy ❌ failed (28 s)
tests: horizon-client ❌ 1151 passed, 2 failed (1 min 54 s)
doc tests ✅ 0 passed (12 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Run on Windows: save::session_lock_is_exclusive, crash::stacks_start_at_the_panicking_frame and the Python tests fail there and are unrelated; clippy stops at the duplicate minecraft:rabbit arm in entity_nbt.rs:502, already on main (#2719 fixes it). Scope counts untracked local files.


🔄 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/2799 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `join-without-rescanning-registries` --- ### 📝 Commits (3) - [`ea7df1d`](https://github.com/horizon-rust/horizon/commit/ea7df1d0dcfa047a2523bed13c5daf458f548a07) registries: list the resources' recipe, loot table and template ids once, not at every join - [`f1a8cc6`](https://github.com/horizon-rust/horizon/commit/f1a8cc6a0dd3d6aca36505b0a9653ff962f2c913) Merge main into join-without-rescanning-registries - [`cf0b111`](https://github.com/horizon-rust/horizon/commit/cf0b111bdda5114e75434a70d86ba8da23f681cb) Merge main into join-without-rescanning-registries ### 📊 Changes **1 file changed** (+89 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/chat.rs` (+89 -56) </details> ### 📄 Description ## What and why Every server join froze the window for 260–400 ms before "Connecting": `build_registries` walked about 5,000 recipe, loot table and structure files, with a metadata call for each. The walk now uses each directory entry's own type and runs once per resources root: 30 ms the first time, 0 after (measured joining a server three times). ## Vanilla reference None: these are the ids Horizon's command arguments suggest; they are unchanged. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 12e0094f1, 3 min 34 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +136 −56 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 331 run, FAILED (failures=2, errors=8, skipped=11) (48 s) | | rustfmt | ✅ (9 s) | | clippy | ❌ failed (28 s) | | tests: horizon-client | ❌ 1151 passed, 2 failed (1 min 54 s) | | doc tests | ✅ 0 passed (12 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Run on Windows: `save::session_lock_is_exclusive`, `crash::stacks_start_at_the_panicking_frame` and the Python tests fail there and are unrelated; clippy stops at the duplicate `minecraft:rabbit` arm in `entity_nbt.rs:502`, already on main (#2719 fixes it). Scope counts untracked local files. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:06:44 +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#4623
No description provided.