[PR #1264] [MERGED] Skip unchanged End surface traversal for 11–13% faster chunk loading #3467

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

📋 Pull Request Information

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

Base: main ← Head: perf/end-identity-surface


📝 Commits (2)

  • 0928c83 Skip provably unchanged native End surface traversal
  • 700c9ec Merge main into #1264: keep the --snapshot usage line

📊 Changes

3 files changed (+305 additions, -27 deletions)

View changed files

📝 crates/horizon-client/examples/streaming_bench.rs (+60 -6)
📝 crates/horizon-world/examples/chunkgen_bench.rs (+81 -1)
📝 crates/horizon-world/src/worldgen/generator.rs (+164 -20)

📄 Description

The End's constant material rule rewrites solid terrain to the end_stone already placed by noise filling. Skip this surface traversal when the native End source, matching constant rule, disabled aquifers/default-air fluid, imported material flags and coordinate bounds prove it cannot change blocks, heightmaps or fluid postprocessing. Custom rules/settings and potentially failing wrapped biome lookups retain the existing path.

Complete End streaming fill improves by a median paired wall reduction of 11.41% at six workers (radius 32; all five paired improvements 5.90–12.48%) and 13.40% at one worker (radius 24). The separate 64×64 proto-plus-decoration workload improves 25.98% at one worker. Each result uses five alternating independent-process pairs after a discarded pair, identical benchmark source/resources and release thin-LTO/one-CGU builds on a Ryzen 5600X. Counts match in every pair; the persistent-pool fill includes generation, decoration, conversion, lighting and meshing.

  • Fresh pinned Minecraft 26.3 full-stage oracle: 54 End chunks across two seeds and central/city/negative rectangles; zero differing blocks, quart biomes or canonical block entities.
  • 36 exact equality checks across 48 terrain/decorated snapshots pass for baseline/candidate at 1 and 12 workers across End central/city/negative/far coordinates and related Overworld/Nether cases. Snapshots cover sections/storage, public block reads, biomes, all heightmaps, ordered postprocessing, ticks, entities and structure metadata.
  • Focused test compares the shortcut with the same constant rule forced through normal surface traversal and checks custom rule/source/fluid/aquifer and wrapped-coordinate fallback guards.
  • Related single-pair checks found no observed regression; these are exploratory checks, not separate dimension speedup claims. Peak RSS remained stable 938220→936936 KiB. Fixed-duration End flight produced identical 385 chunks / 8040 sections with zero nearby-unlit frames in both versions.
  • Repository quick self-check passes: public tree, rustfmt, clippy, 1,338 client/world tests and doc tests. The broader affected-harness list is deferred to CI by --quick; the scoped full-stage End oracle above was run fresh locally.

Resource initialization is outside the fill timing. The benchmark examples gain exact metrics, native dimension/center selection and an optional snapshot mode. No diagnostic production instrumentation or report artifacts are included.


🔄 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/1264 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/end-identity-surface` --- ### 📝 Commits (2) - [`0928c83`](https://github.com/horizon-rust/horizon/commit/0928c83d4c28fb285c07e5c2404c5a7016cb5d7d) Skip provably unchanged native End surface traversal - [`700c9ec`](https://github.com/horizon-rust/horizon/commit/700c9ec8cd402557b39df993a738b4fe30519fcf) Merge main into #1264: keep the --snapshot usage line ### 📊 Changes **3 files changed** (+305 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/streaming_bench.rs` (+60 -6) 📝 `crates/horizon-world/examples/chunkgen_bench.rs` (+81 -1) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+164 -20) </details> ### 📄 Description The End's constant material rule rewrites solid terrain to the end_stone already placed by noise filling. Skip this surface traversal when the native End source, matching constant rule, disabled aquifers/default-air fluid, imported material flags and coordinate bounds prove it cannot change blocks, heightmaps or fluid postprocessing. Custom rules/settings and potentially failing wrapped biome lookups retain the existing path. Complete End streaming fill improves by a median paired wall reduction of **11.41%** at six workers (radius 32; all five paired improvements 5.90–12.48%) and **13.40%** at one worker (radius 24). The separate 64×64 proto-plus-decoration workload improves **25.98%** at one worker. Each result uses five alternating independent-process pairs after a discarded pair, identical benchmark source/resources and release thin-LTO/one-CGU builds on a Ryzen 5600X. Counts match in every pair; the persistent-pool fill includes generation, decoration, conversion, lighting and meshing. - Fresh pinned Minecraft 26.3 full-stage oracle: 54 End chunks across two seeds and central/city/negative rectangles; zero differing blocks, quart biomes or canonical block entities. - 36 exact equality checks across 48 terrain/decorated snapshots pass for baseline/candidate at 1 and 12 workers across End central/city/negative/far coordinates and related Overworld/Nether cases. Snapshots cover sections/storage, public block reads, biomes, all heightmaps, ordered postprocessing, ticks, entities and structure metadata. - Focused test compares the shortcut with the same constant rule forced through normal surface traversal and checks custom rule/source/fluid/aquifer and wrapped-coordinate fallback guards. - Related single-pair checks found no observed regression; these are exploratory checks, not separate dimension speedup claims. Peak RSS remained stable 938220→936936 KiB. Fixed-duration End flight produced identical 385 chunks / 8040 sections with zero nearby-unlit frames in both versions. - Repository quick self-check passes: public tree, rustfmt, clippy, 1,338 client/world tests and doc tests. The broader affected-harness list is deferred to CI by --quick; the scoped full-stage End oracle above was run fresh locally. Resource initialization is outside the fill timing. The benchmark examples gain exact metrics, native dimension/center selection and an optional snapshot mode. No diagnostic production instrumentation or report artifacts are included. --- <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:44 +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#3467
No description provided.