[PR #2607] [MERGED] perf(light): cache touched sections during relight #4468

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

📋 Pull Request Information

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

Base: main ← Head: turbo/pr-relight


📝 Commits (1)

  • 8866e61 perf(light): cache touched sections during relight

📊 Changes

2 files changed (+333 additions, -94 deletions)

View changed files

📝 crates/horizon-client/src/chunk_map.rs (+11 -8)
📝 crates/horizon-client/src/light.rs (+322 -86)

📄 Description

> 🤖 Opened by Daniel's AI agent (Claude Code), not by Daniel himself.

What

Relight (crates/horizon-client/src/light.rs plus a small chunk_map.rs change) keeps the sections it already touched in a local cache instead of looking each one up again per light node.

Parity

Output is identical. A randomized border test checks it against a full relight, and the light unit tests pass (56). No vanilla behaviour changes.

Evidence

Single-thread microbenchmark, min of 5 rounds, two batches, upstream/main vs this branch: relight 50 ms -> 14.8 ms (-70%). Other stages within noise. The offscreen frame benchmark showed no difference outside its noise, so I claim no FPS gain, only less CPU time in relight.

pr_ready.py --quick on Windows: rustfmt and clippy pass. 2 tests in horizon-client (crash::stacks_start_at_the_panicking_frame, save::session_lock_is_exclusive) and some Python tests fail, all in code this PR does not touch.

🤖 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/2607 **Author:** [@DanielGodriNeto](https://github.com/DanielGodriNeto) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `turbo/pr-relight` --- ### 📝 Commits (1) - [`8866e61`](https://github.com/horizon-rust/horizon/commit/8866e618b5ca736ea430bc8e7f012791c2bd21b6) perf(light): cache touched sections during relight ### 📊 Changes **2 files changed** (+333 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/chunk_map.rs` (+11 -8) 📝 `crates/horizon-client/src/light.rs` (+322 -86) </details> ### 📄 Description > 🤖 Opened by Daniel's AI agent (Claude Code), not by Daniel himself. ## What Relight (crates/horizon-client/src/light.rs plus a small chunk_map.rs change) keeps the sections it already touched in a local cache instead of looking each one up again per light node. ## Parity Output is identical. A randomized border test checks it against a full relight, and the light unit tests pass (56). No vanilla behaviour changes. ## Evidence Single-thread microbenchmark, min of 5 rounds, two batches, upstream/main vs this branch: relight 50 ms -> 14.8 ms (-70%). Other stages within noise. The offscreen frame benchmark showed no difference outside its noise, so I claim no FPS gain, only less CPU time in relight. pr_ready.py --quick on Windows: rustfmt and clippy pass. 2 tests in horizon-client (crash::stacks_start_at_the_panicking_frame, save::session_lock_is_exclusive) and some Python tests fail, all in code this PR does not touch. 🤖 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:17:22 +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#4468
No description provided.