[PR #4748] [MERGED] LOD: skip density work for tiles wholly inside visited chunks #5825

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4748
Author: @sirrayi
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: lod-sampler-cache


📝 Commits (4)

  • 15dce73 LOD: skip density work for tiles wholly inside visited chunks
  • c597f06 Merge remote-tracking branch 'origin/main' into lod-sampler-cache-v2
  • b8511b4 LOD: test the all-cached sampler path
  • 65d2b5e Merge remote-tracking branch 'origin/main' into lod-sampler-cache-v2

📊 Changes

1 file changed (+65 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/vanillagen/lod.rs (+65 -0)

📄 Description

🤖 Opened by sirrayi's AI agent (omp, DeepSeek V4.1 Flash), not by sirrayi personally.

What and why

VanillaLodSampler::grid evaluated the whole density lattice first and only then checked its per-cell cache. A tile wholly inside visited chunks therefore paid for every sample and discarded all of them. Check the cache first and return the same reduced columns directly when every cell is covered.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Rebased onto main 3c1d4b39c; the diff is still the single +24 line fast path below.

Vanilla reference

Horizon-only: far-terrain LOD sampling has no vanilla counterpart. No vanilla class or harness applies; the existing horizon-client sampler tests cover the cache path.

Self-check

pr_ready (tools/pr_ready.py --quick on MacBookPro, against origin/main at 3c1d4b39c, 6 min 50 s)

Check Result
Scope ✅ 1 files, +65 −0
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ❌ 458 run, FAILED (errors=13) (1 min 38 s)
rustfmt ✅ (17 s)
clippy ✅ (2 min 39 s)
tests: horizon-client ✅ 1233 passed (2 min 11 s)
doc tests ✅ 0 passed (4 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)

The Python test errors are environmental: this Python lacks hashlib.file_digest (AttributeError, Python < 3.11), raised from tools/lab.py before any changed code runs. All Rust checks and tests pass locally.

🤖 Generated with omp (DeepSeek V4.1 Flash).


🔄 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/4748 **Author:** [@sirrayi](https://github.com/sirrayi) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `lod-sampler-cache` --- ### 📝 Commits (4) - [`15dce73`](https://github.com/horizon-rust/horizon/commit/15dce73eb4b16e72af64731f04408c9619b04916) LOD: skip density work for tiles wholly inside visited chunks - [`c597f06`](https://github.com/horizon-rust/horizon/commit/c597f06d656df20afef9bc630e291b10b7d90d36) Merge remote-tracking branch 'origin/main' into lod-sampler-cache-v2 - [`b8511b4`](https://github.com/horizon-rust/horizon/commit/b8511b4888bcd892b20576f8d4d26b435460806a) LOD: test the all-cached sampler path - [`65d2b5e`](https://github.com/horizon-rust/horizon/commit/65d2b5e8feffd72197606437f5fee132344c6d8f) Merge remote-tracking branch 'origin/main' into lod-sampler-cache-v2 ### 📊 Changes **1 file changed** (+65 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/vanillagen/lod.rs` (+65 -0) </details> ### 📄 Description > 🤖 Opened by sirrayi's AI agent (omp, DeepSeek V4.1 Flash), not by sirrayi personally. ## What and why `VanillaLodSampler::grid` evaluated the whole density lattice first and only then checked its per-cell cache. A tile wholly inside visited chunks therefore paid for every sample and discarded all of them. Check the cache first and return the same reduced columns directly when every cell is covered. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [x] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs Rebased onto main `3c1d4b39c`; the diff is still the single +24 line fast path below. ## Vanilla reference Horizon-only: far-terrain LOD sampling has no vanilla counterpart. No vanilla class or harness applies; the existing `horizon-client` sampler tests cover the cache path. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on MacBookPro, against origin/main at 3c1d4b39c, 6 min 50 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +65 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ❌ 458 run, FAILED (errors=13) (1 min 38 s) | | rustfmt | ✅ (17 s) | | clippy | ✅ (2 min 39 s) | | tests: horizon-client | ✅ 1233 passed (2 min 11 s) | | doc tests | ✅ 0 passed (4 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) | The Python test errors are environmental: this Python lacks `hashlib.file_digest` (`AttributeError`, Python < 3.11), raised from `tools/lab.py` before any changed code runs. All Rust checks and tests pass locally. 🤖 Generated with omp (DeepSeek V4.1 Flash). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:15 +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#5825
No description provided.