[PR #6502] [MERGED] chunk_load_bench: measure the workers' mesh path, per-section percentiles #6917

Closed
opened 2026-11-03 06:29:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: perf/mesh-bench


📝 Commits (1)

  • 5334979 chunk_load_bench: the workers' mesh path, per-section percentiles, parallel throughput

📊 Changes

2 files changed (+181 additions, -40 deletions)

View changed files

📝 crates/horizon-client-render/src/mesher.rs (+5 -3)
📝 crates/horizon-client/examples/chunk_load_bench.rs (+176 -37)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Part of the client performance wave (chunk section meshing). chunk_load_bench measured Mesher::mesh, which allocates a fresh mesh and scratch per section; the workers use mesh_reusing with recycled buffers and then sort_solid. The bench now measures that path, so A/B pairs of mesher changes show what players get.

What it prints now (seed 1234, the perf_bench village, radius 8):

meshed 4440 sections (1598 with geometry, 2709572 vertices, 65.0 MB of vertices, checksum afdcd05aec013a23) in 450.0 ms of CPU (101.3 us per section)
per section (best of 3 rounds, us): p50 0.4 p90 314.4 p99 675.2 max 1423.5; with geometry: mean 264.9; 9868 sections/s per core
3 threads meshed 4440 sections in 678.5 ms of wall time: 6543 sections/s
  • Each section's CPU time is the least of --rounds, which gives p50/p90/p99/max and the mean over sections with geometry.
  • --mesh-threads N meshes every section with N threads at once (wall time): that's the throughput with memory bandwidth and the allocator included.
  • --json out.json writes a summary for A/B scripts.
  • The checksum covers the visibility graph as well as the vertices.
  • MeshScratch, Mesher::mesh_reusing and SectionMesh::clear become pub so the example can call them. Nothing else changes.

Tooling only (skip-release).

tools/pr_ready.py is queued behind the build slots on playhorizon (11-01 rule: 3 builds at once there). Its block will follow in a comment; CI verify runs the same fmt/clippy/tests meanwhile.

🤖 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/6502 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/mesh-bench` --- ### 📝 Commits (1) - [`5334979`](https://github.com/horizon-rust/horizon/commit/5334979f605153b9ddc286dcad340d3bed45f103) chunk_load_bench: the workers' mesh path, per-section percentiles, parallel throughput ### 📊 Changes **2 files changed** (+181 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/mesher.rs` (+5 -3) 📝 `crates/horizon-client/examples/chunk_load_bench.rs` (+176 -37) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of the client performance wave (chunk section meshing). `chunk_load_bench` measured `Mesher::mesh`, which allocates a fresh mesh and scratch per section; the workers use `mesh_reusing` with recycled buffers and then `sort_solid`. The bench now measures that path, so A/B pairs of mesher changes show what players get. What it prints now (seed 1234, the perf_bench village, radius 8): ``` meshed 4440 sections (1598 with geometry, 2709572 vertices, 65.0 MB of vertices, checksum afdcd05aec013a23) in 450.0 ms of CPU (101.3 us per section) per section (best of 3 rounds, us): p50 0.4 p90 314.4 p99 675.2 max 1423.5; with geometry: mean 264.9; 9868 sections/s per core 3 threads meshed 4440 sections in 678.5 ms of wall time: 6543 sections/s ``` - Each section's CPU time is the least of `--rounds`, which gives p50/p90/p99/max and the mean over sections with geometry. - `--mesh-threads N` meshes every section with N threads at once (wall time): that's the throughput with memory bandwidth and the allocator included. - `--json out.json` writes a summary for A/B scripts. - The checksum covers the visibility graph as well as the vertices. - `MeshScratch`, `Mesher::mesh_reusing` and `SectionMesh::clear` become `pub` so the example can call them. Nothing else changes. Tooling only (`skip-release`). `tools/pr_ready.py` is queued behind the build slots on playhorizon (11-01 rule: 3 builds at once there). Its block will follow in a comment; CI verify runs the same fmt/clippy/tests meanwhile. 🤖 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 06:29:13 +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#6917
No description provided.