[PR #2] [MERGED] Add optional adaptive terrain scheduling and resource measurements #2254

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

📋 Pull Request Information

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

Base: main ← Head: adaptive-client-budget


📝 Commits (3)

  • 9c21005 Add optional adaptive distant terrain budget and resource telemetry
  • fab0060 Verify adaptive API restoration and override ownership
  • a5bbebf Preserve prior original mod builds when upgrading test instances

📊 Changes

21 files changed (+478 additions, -30 deletions)

View changed files

📝 README.md (+7 -1)
➕ docs/adaptive-terrain.md (+54 -0)
📝 docs/playable-validation.md (+17 -0)
➕ mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainBudget.java (+38 -0)
➕ mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java (+74 -0)
📝 mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java (+50 -6)
📝 mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Recording.java (+34 -2)
📝 mods/horizon-lab/src/main/resources/fabric.mod.json (+13 -5)
➕ mods/horizon-lab/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java (+30 -0)
➕ mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java (+56 -0)
📝 mods/horizon-lab/src/test/java/dev/horizonlab/metrics/MetricsTest.java (+6 -0)
📝 packs/Mac-Start.command (+1 -1)
📝 packs/START-HERE.txt (+12 -3)
📝 packs/mods.lock.json (+1 -1)
📝 tests/test_packs.py (+33 -1)
📝 tools/build_mod.py (+15 -0)
📝 tools/build_pack.py (+9 -3)
📝 tools/build_release.py (+3 -3)
📝 tools/compare_benchmarks.py (+2 -1)
📝 tools/runtime.py (+19 -0)

...and 1 more files

📄 Description

Distant terrain preparation competes with foreground rendering during exploration. Add an optional adaptive profile that reduces Distant Horizons background duty cycle when frames or heap usage show pressure, then recovers gradually. Render distances and simulation settings stay unchanged; balanced remains the default.

Add sampled peak JVM heap/nonheap and whole-process CPU measurements to frame/tick reports. Build tooling derives mod filenames and starter versions from the lock, and preserves old original mod builds outside the active mod directory during upgrades.

Validation: all Linux, Apple Silicon macOS and Windows CI checks passed; 19 offline Python tests and original Java metrics/policy/API adapter tests passed. The real demo world rendered with the adaptive profile, applied live duty-cycle changes, and restored the original ratio on pause. A baseline instance starts without DH; dedicated-server dependencies initialize with EULA false. F8 produced matching CSV/JSON with 193 frame intervals and 1,651 integrated-server ticks, heap peaks and CPU measurements. The Linux GPU is llvmpipe software rendering: this verifies integration, not a Mac speedup.


🔄 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/2 **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:** `adaptive-client-budget` --- ### 📝 Commits (3) - [`9c21005`](https://github.com/horizon-rust/horizon/commit/9c2100563e17bd83a58271d44bcc022db499fd6e) Add optional adaptive distant terrain budget and resource telemetry - [`fab0060`](https://github.com/horizon-rust/horizon/commit/fab0060bcaae5e330cf3f237f74a21a5dfc080eb) Verify adaptive API restoration and override ownership - [`a5bbebf`](https://github.com/horizon-rust/horizon/commit/a5bbebf89b967c4a86a8108ab0b4151f5336171c) Preserve prior original mod builds when upgrading test instances ### 📊 Changes **21 files changed** (+478 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+7 -1) ➕ `docs/adaptive-terrain.md` (+54 -0) 📝 `docs/playable-validation.md` (+17 -0) ➕ `mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainBudget.java` (+38 -0) ➕ `mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java` (+74 -0) 📝 `mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java` (+50 -6) 📝 `mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Recording.java` (+34 -2) 📝 `mods/horizon-lab/src/main/resources/fabric.mod.json` (+13 -5) ➕ `mods/horizon-lab/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java` (+30 -0) ➕ `mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java` (+56 -0) 📝 `mods/horizon-lab/src/test/java/dev/horizonlab/metrics/MetricsTest.java` (+6 -0) 📝 `packs/Mac-Start.command` (+1 -1) 📝 `packs/START-HERE.txt` (+12 -3) 📝 `packs/mods.lock.json` (+1 -1) 📝 `tests/test_packs.py` (+33 -1) 📝 `tools/build_mod.py` (+15 -0) 📝 `tools/build_pack.py` (+9 -3) 📝 `tools/build_release.py` (+3 -3) 📝 `tools/compare_benchmarks.py` (+2 -1) 📝 `tools/runtime.py` (+19 -0) _...and 1 more files_ </details> ### 📄 Description Distant terrain preparation competes with foreground rendering during exploration. Add an optional adaptive profile that reduces Distant Horizons background duty cycle when frames or heap usage show pressure, then recovers gradually. Render distances and simulation settings stay unchanged; balanced remains the default. Add sampled peak JVM heap/nonheap and whole-process CPU measurements to frame/tick reports. Build tooling derives mod filenames and starter versions from the lock, and preserves old original mod builds outside the active mod directory during upgrades. Validation: all Linux, Apple Silicon macOS and Windows CI checks passed; 19 offline Python tests and original Java metrics/policy/API adapter tests passed. The real demo world rendered with the adaptive profile, applied live duty-cycle changes, and restored the original ratio on pause. A baseline instance starts without DH; dedicated-server dependencies initialize with EULA false. F8 produced matching CSV/JSON with 193 frame intervals and 1,651 integrated-server ticks, heap peaks and CPU measurements. The Linux GPU is llvmpipe software rendering: this verifies integration, not a Mac speedup. --- <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:24 +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#2254
No description provided.