[PR #2839] [MERGED] sounds: list each namespace's sound files once instead of a lookup per sound #4648

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

📋 Pull Request Information

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

Base: main ← Head: sounds-index-without-stat


📝 Commits (2)

  • 66b705c sounds: list each namespace's sound files once instead of a lookup per sound
  • 916150f Merge main into this branch

📊 Changes

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

View changed files

📝 crates/horizon-client-render/src/sound_events.rs (+61 -5)

📄 Description

What and why

Starting the game froze the startup menu for about half a second: SoundRegistry::load checked each of the ~5,000 sounds in sounds.json with its own file lookup (357–436 ms here, 473–569 ms during startup). Each namespace's sounds/ folder is now listed once and the sounds are checked against that list: Audio::new takes 60 ms and the startup handoff 151 ms instead of 554–651 ms.

Vanilla reference

None for the listing; the check itself (SoundManager.Preparations.handleRegistration: a sound whose file is missing is dropped) is unchanged.

Self-check

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

Check Result
Scope ✅ 1 files, +61 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 331 run, FAILED (failures=2, errors=8, skipped=11) (56 s)
rustfmt ✅ (10 s)
clippy ❌ failed (42 s)
tests: horizon-client ❌ 1152 passed, 2 failed (1 min 19 s)
doc tests ✅ 0 passed (32 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), and is clean with that lint allowed.


🔄 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/2839 **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:** `sounds-index-without-stat` --- ### 📝 Commits (2) - [`66b705c`](https://github.com/horizon-rust/horizon/commit/66b705cec32669c019a5cd8103bec73c3fcfd221) sounds: list each namespace's sound files once instead of a lookup per sound - [`916150f`](https://github.com/horizon-rust/horizon/commit/916150f02c7e777d058f8be9b629a2490acfdf0d) Merge main into this branch ### 📊 Changes **1 file changed** (+61 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/sound_events.rs` (+61 -5) </details> ### 📄 Description ## What and why Starting the game froze the startup menu for about half a second: `SoundRegistry::load` checked each of the ~5,000 sounds in `sounds.json` with its own file lookup (357–436 ms here, 473–569 ms during startup). Each namespace's `sounds/` folder is now listed once and the sounds are checked against that list: `Audio::new` takes 60 ms and the startup handoff 151 ms instead of 554–651 ms. ## Vanilla reference None for the listing; the check itself (`SoundManager.Preparations.handleRegistration`: a sound whose file is missing is dropped) is unchanged. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 12e0094f1, 3 min 44 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +61 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 331 run, FAILED (failures=2, errors=8, skipped=11) (56 s) | | rustfmt | ✅ (10 s) | | clippy | ❌ failed (42 s) | | tests: horizon-client | ❌ 1152 passed, 2 failed (1 min 19 s) | | doc tests | ✅ 0 passed (32 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), and is clean with that lint allowed. --- <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:55 +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#4648
No description provided.