[PR #6976] [MERGED] Prepared data file: tags, synchronized registries and advancements read through it #7246

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6976
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/prepared-data-tags


📝 Commits (1)

  • 6d0d191 Prepared data file: tags, synchronized registries and advancements read through it

📊 Changes

3 files changed (+35 additions, -72 deletions)

View changed files

📝 crates/horizon-client/src/advancements.rs (+11 -28)
📝 crates/horizon-client/src/lan/data.rs (+11 -16)
📝 crates/horizon-items/src/items.rs (+13 -28)

📄 Description

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

Part of #1961. Stacked on #6893 (it adds horizon-data.bin and the json_folder reader); retargets to main when that merges.

What

Three more folder readers go through json_folder, so they read from horizon-data.bin when the root has one. A load building several tables from the same folder also reads it once:

  • horizon-items load_tag_lists: the item and block tags. It was its own recursive walk, which opened every tag file once per kind and per table.
  • lan/data.rs walk: the LAN sync's synchronized registries, its tags and dialog tags.
  • advancements::Tree::load_with: the advancement tree. The collect walk is gone.

Behaviour stays as it was: same ids (namespace:path/without/.json), and each reader handles a bad file as before. Tags fail the load; the sync and the advancements skip it.

A/B (playhorizon; a copy of the prepared root with its horizon-data.bin; strace of a --world start to the full view)

files opened under the prepared root #6893 this PR
all 27,905 21,991 (main: 40,282)
data/minecraft/tags 4,602 626
data/minecraft/advancement 1,896 15
synchronized registries (painting, banner, damage type, trims, variants, songs, instruments, enchantments) 733 466

Tests: horizon-items (54) and horizon-client-lib advancements/lan:: (170) pass on playhorizon. The json_folder test of #6893 covers reading a folder from the data file.

🤖 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/6976 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/prepared-data-tags` --- ### 📝 Commits (1) - [`6d0d191`](https://github.com/horizon-rust/horizon/commit/6d0d1915fe30c4ec67083313c5791aa65e67207e) Prepared data file: tags, synchronized registries and advancements read through it ### 📊 Changes **3 files changed** (+35 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/advancements.rs` (+11 -28) 📝 `crates/horizon-client/src/lan/data.rs` (+11 -16) 📝 `crates/horizon-items/src/items.rs` (+13 -28) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of #1961. Stacked on #6893 (it adds `horizon-data.bin` and the `json_folder` reader); retargets to main when that merges. ## What Three more folder readers go through `json_folder`, so they read from `horizon-data.bin` when the root has one. A load building several tables from the same folder also reads it once: - `horizon-items` `load_tag_lists`: the item and block tags. It was its own recursive walk, which opened every tag file once per kind and per table. - `lan/data.rs` `walk`: the LAN sync's synchronized registries, its tags and dialog tags. - `advancements::Tree::load_with`: the advancement tree. The `collect` walk is gone. Behaviour stays as it was: same ids (`namespace:path/without/.json`), and each reader handles a bad file as before. Tags fail the load; the sync and the advancements skip it. ## A/B (playhorizon; a copy of the prepared root with its `horizon-data.bin`; strace of a `--world` start to the full view) | files opened under the prepared root | #6893 | this PR | |---|---:|---:| | all | 27,905 | **21,991** (main: 40,282) | | `data/minecraft/tags` | 4,602 | **626** | | `data/minecraft/advancement` | 1,896 | **15** | | synchronized registries (painting, banner, damage type, trims, variants, songs, instruments, enchantments) | 733 | **466** | Tests: `horizon-items` (54) and `horizon-client-lib` `advancements`/`lan::` (170) pass on playhorizon. The json_folder test of #6893 covers reading a folder from the data file. 🤖 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 06:36:19 +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#7246
No description provided.