[PR #14] [MERGED] Reuse terrain tick membership storage while preserving action order #2264

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

📋 Pull Request Information

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

Base: main ← Head: terrain-tick-deduplication


📝 Commits (2)

  • e091816 Reuse private terrain tick membership without changing published action order
  • f6b3685 Publish sanitized applied tick membership measurements with CI provenance

📊 Changes

19 files changed (+346 additions, -18 deletions)

View changed files

📝 .github/workflows/ci.yml (+6 -0)
📝 README.md (+8 -1)
➕ benchmarks/tick-membership-2026-10-04/linux-applied-hooks.json (+41 -0)
📝 docs/foreground-first.md (+3 -1)
➕ docs/tick-membership.md (+44 -0)
📝 mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java (+1 -0)
➕ mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java (+30 -0)
📝 mods/horizon-lab/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java (+18 -0)
📝 mods/horizon-lab/src/main/resources/fabric.mod.json (+1 -1)
📝 mods/horizon-lab/src/main/resources/horizonlab.mixins.json (+1 -1)
➕ mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java (+87 -0)
📝 packs/START-HERE.txt (+6 -1)
📝 packs/mods.lock.json (+1 -1)
📝 tests/test_packs.py (+13 -1)
📝 tools/Compare-Benchmarks.html (+2 -1)
📝 tools/build_mod.py (+14 -6)
📝 tools/build_pack.py (+6 -3)
📝 tools/compare_benchmarks.py (+1 -1)
➕ tools/test_tick_dedup.py (+63 -0)

📄 Description

DH repeatedly allocated HashMap entries for its private already-handled-this-tick membership set. The optional pinned hook replaces only those membership tests with reusable open-addressed storage and clears at the original boundary. Original action collections, precedence, iteration order and traversal remain upstream.

Adds an isolated tick-dedup profile with identical balanced graphics/worker settings, includes the hook in the optional foreground combinations, and records/discloses its applied state. Balanced and all other profiles explicitly disable it. Private fixture building is shared with the existing dispatcher fixture; no fixture or publisher code enters release packs.

Validation: 24 Python checks pass. Two actual Fabric clients each checked 6,000 randomized transitions including duplicate/null handling, force-disable precedence, clear and published iteration order. The warmed actual holder loop used 512 preallocated nodes over 20,000 ticks: 245,760,208 bytes upstream versus 208 with the hook. One CPU observation was 565 ms versus 381 ms; this is an isolated mechanism check, not a statistical/game FPS or whole-memory claim. All final-head CI jobs passed on Linux, Windows and Apple Silicon macOS 26, including actual Linux fixture application. The sanitized CI result is committed with workflow/source provenance. Two exact-release-JAR game captures from copied closed demo worlds ran for 120 seconds: 750/726 frames and 2,409/2,402 ticks, zero excluded frames, matching CSV counts, unchanged visual snapshots, and no captured graphics mismatches. Only the membership hook differed among controller flags. Worlds/databases/workers closed normally. Private JFR observed the DH tick thread at 90,923 versus 195,772 allocated bytes/second in that fixed-order pair; this is one live observation with cache/workload differences still possible, not a causal FPS/RAM estimate. The offline viewer displays applied state and flags the experiment difference. No Mac graphics benchmark was possible here. Prepares v0.13.0.


🔄 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/14 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/3/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `terrain-tick-deduplication` --- ### 📝 Commits (2) - [`e091816`](https://github.com/horizon-rust/horizon/commit/e091816ce06686d64d0f7a181a42701aa67e5bf7) Reuse private terrain tick membership without changing published action order - [`f6b3685`](https://github.com/horizon-rust/horizon/commit/f6b36854ed5d1e8abb40ac3d245160e6b3a4ffff) Publish sanitized applied tick membership measurements with CI provenance ### 📊 Changes **19 files changed** (+346 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+6 -0) 📝 `README.md` (+8 -1) ➕ `benchmarks/tick-membership-2026-10-04/linux-applied-hooks.json` (+41 -0) 📝 `docs/foreground-first.md` (+3 -1) ➕ `docs/tick-membership.md` (+44 -0) 📝 `mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java` (+1 -0) ➕ `mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java` (+30 -0) 📝 `mods/horizon-lab/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java` (+18 -0) 📝 `mods/horizon-lab/src/main/resources/fabric.mod.json` (+1 -1) 📝 `mods/horizon-lab/src/main/resources/horizonlab.mixins.json` (+1 -1) ➕ `mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java` (+87 -0) 📝 `packs/START-HERE.txt` (+6 -1) 📝 `packs/mods.lock.json` (+1 -1) 📝 `tests/test_packs.py` (+13 -1) 📝 `tools/Compare-Benchmarks.html` (+2 -1) 📝 `tools/build_mod.py` (+14 -6) 📝 `tools/build_pack.py` (+6 -3) 📝 `tools/compare_benchmarks.py` (+1 -1) ➕ `tools/test_tick_dedup.py` (+63 -0) </details> ### 📄 Description DH repeatedly allocated HashMap entries for its private already-handled-this-tick membership set. The optional pinned hook replaces only those membership tests with reusable open-addressed storage and clears at the original boundary. Original action collections, precedence, iteration order and traversal remain upstream. Adds an isolated tick-dedup profile with identical balanced graphics/worker settings, includes the hook in the optional foreground combinations, and records/discloses its applied state. Balanced and all other profiles explicitly disable it. Private fixture building is shared with the existing dispatcher fixture; no fixture or publisher code enters release packs. Validation: 24 Python checks pass. Two actual Fabric clients each checked 6,000 randomized transitions including duplicate/null handling, force-disable precedence, clear and published iteration order. The warmed actual holder loop used 512 preallocated nodes over 20,000 ticks: 245,760,208 bytes upstream versus 208 with the hook. One CPU observation was 565 ms versus 381 ms; this is an isolated mechanism check, not a statistical/game FPS or whole-memory claim. All final-head CI jobs passed on Linux, Windows and Apple Silicon macOS 26, including actual Linux fixture application. The sanitized CI result is committed with workflow/source provenance. Two exact-release-JAR game captures from copied closed demo worlds ran for 120 seconds: 750/726 frames and 2,409/2,402 ticks, zero excluded frames, matching CSV counts, unchanged visual snapshots, and no captured graphics mismatches. Only the membership hook differed among controller flags. Worlds/databases/workers closed normally. Private JFR observed the DH tick thread at 90,923 versus 195,772 allocated bytes/second in that fixed-order pair; this is one live observation with cache/workload differences still possible, not a causal FPS/RAM estimate. The offline viewer displays applied state and flags the experiment difference. No Mac graphics benchmark was possible here. Prepares v0.13.0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:54:28 +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#2264
No description provided.