[PR #1207] [MERGED] Faster feature decoration: region grid, ore column fast path, lazy biome cache #3420

Closed
opened 2026-11-03 04:09:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: claude/upstream-feature-speedups


📝 Commits (2)

  • bc9e5af Faster feature decoration: region grid, ore column fast path, lazy biome cache
  • ac60b33 worldgen: chunks far apart still make a region (map past the grid)

📊 Changes

6 files changed (+223 additions, -36 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/biome_temperature.rs (+4 -2)
📝 crates/horizon-world/src/worldgen/feature_region.rs (+100 -28)
📝 crates/horizon-world/src/worldgen/generator_decoration.rs (+37 -0)
📝 crates/horizon-world/src/worldgen/ore_feature.rs (+27 -6)
📝 crates/horizon-world/src/worldgen/placement/context.rs (+12 -0)
📝 crates/horizon-world/tests/feature_region.rs (+43 -0)

📄 Description

Requested by JR

What and why

Faster feature decoration: region grid, ore column fast path, lazy biome cache

TerrainRegion indexes its chunks through a grid over their bounding box.
OreFeature asks the world whether any column under its blob reaches the
floor heightmap in one call, and tracks tested positions in a bitset.
BiomeTemperature no longer preallocates its map and queue. Same output.

Vanilla reference

WorldGenRegion, OreFeature.place / doPlace and Biome.getTemperature's cache: same output. Harnesses: test_decoration_parity.py, test_feature_region_parity.py, test_scattered_ore_parity.py, test_biome_temperature_parity.py.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on Mac, against upstream/main at e730dc142, 2 min 57 s)

Check Result
Scope ✅ 5 files, +133 −31
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (4 s)
clippy ✅ (1 min 8 s)
tests: horizon-world ✅ 227 passed (1 min 41 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): 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)

🤖 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/1207 **Author:** [@pirut](https://github.com/pirut) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `claude/upstream-feature-speedups` --- ### 📝 Commits (2) - [`bc9e5af`](https://github.com/horizon-rust/horizon/commit/bc9e5afacce9cea888472491a83f57660c224dcf) Faster feature decoration: region grid, ore column fast path, lazy biome cache - [`ac60b33`](https://github.com/horizon-rust/horizon/commit/ac60b337aa4374456664ed54c06f58e9bf9d2a56) worldgen: chunks far apart still make a region (map past the grid) ### 📊 Changes **6 files changed** (+223 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/biome_temperature.rs` (+4 -2) 📝 `crates/horizon-world/src/worldgen/feature_region.rs` (+100 -28) 📝 `crates/horizon-world/src/worldgen/generator_decoration.rs` (+37 -0) 📝 `crates/horizon-world/src/worldgen/ore_feature.rs` (+27 -6) 📝 `crates/horizon-world/src/worldgen/placement/context.rs` (+12 -0) 📝 `crates/horizon-world/tests/feature_region.rs` (+43 -0) </details> ### 📄 Description <!-- claude-projects-attribution: {"github_login":"pirut"} --> _Requested by **JR**_ ## What and why Faster feature decoration: region grid, ore column fast path, lazy biome cache TerrainRegion indexes its chunks through a grid over their bounding box. OreFeature asks the world whether any column under its blob reaches the floor heightmap in one call, and tracks tested positions in a bitset. BiomeTemperature no longer preallocates its map and queue. Same output. ## Vanilla reference `WorldGenRegion`, `OreFeature.place` / `doPlace` and `Biome.getTemperature`'s cache: same output. Harnesses: `test_decoration_parity.py`, `test_feature_region_parity.py`, `test_scattered_ore_parity.py`, `test_biome_temperature_parity.py`. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on Mac, against upstream/main at e730dc142, 2 min 57 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +133 −31 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (4 s) | | clippy | ✅ (1 min 8 s) | | tests: horizon-world | ✅ 227 passed (1 min 41 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): 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) | 🤖 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 04:09:25 +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#3420
No description provided.