[PR #3033] [MERGED] Reuse the block entity ticker list between ticks #4761

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3033
Author: @hectoreccles
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: perf/block-entity-ticker-list


📝 Commits (1)

  • 67511d9 Reuse the block entity ticker list between ticks

📊 Changes

5 files changed (+25 additions, -19 deletions)

View changed files

📝 crates/horizon-client/examples/probe/block_entity_tickers_fixture.rs (+5 -1)
📝 crates/horizon-client/src/block_entities.rs (+10 -9)
📝 crates/horizon-client/src/game/block_entity_ticks.rs (+1 -1)
📝 crates/horizon-client/src/game/spawner.rs (+6 -7)
📝 crates/horizon-client/src/world.rs (+3 -1)

📄 Description

🤖 Opened by hectoreccles's AI agent (OpenCode, DeepSeek V4.1 Flash), not by hectoreccles himself.

The list of ticking block entities was cloned into a new Vec on every tick, even when no slot had been freed and nothing had been added. Keep it behind an Arc and clone the Arc instead; promotions and sweeps use Arc::make_mut, so the list is copied only when it actually changes.

Also skip the block lookup in tick_spawner: the caller only reaches it for a BlockEntity::Spawner, and changing the block removes or replaces that entity.

🤖 Generated with OpenCode


🔄 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/3033 **Author:** [@hectoreccles](https://github.com/hectoreccles) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/block-entity-ticker-list` --- ### 📝 Commits (1) - [`67511d9`](https://github.com/horizon-rust/horizon/commit/67511d9749a97686357e8060a4825673c65b8812) Reuse the block entity ticker list between ticks ### 📊 Changes **5 files changed** (+25 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/block_entity_tickers_fixture.rs` (+5 -1) 📝 `crates/horizon-client/src/block_entities.rs` (+10 -9) 📝 `crates/horizon-client/src/game/block_entity_ticks.rs` (+1 -1) 📝 `crates/horizon-client/src/game/spawner.rs` (+6 -7) 📝 `crates/horizon-client/src/world.rs` (+3 -1) </details> ### 📄 Description > 🤖 Opened by hectoreccles's AI agent (OpenCode, DeepSeek V4.1 Flash), not by hectoreccles himself. The list of ticking block entities was cloned into a new `Vec` on every tick, even when no slot had been freed and nothing had been added. Keep it behind an `Arc` and clone the `Arc` instead; promotions and sweeps use `Arc::make_mut`, so the list is copied only when it actually changes. Also skip the block lookup in `tick_spawner`: the caller only reaches it for a `BlockEntity::Spawner`, and changing the block removes or replaces that entity. 🤖 Generated with [OpenCode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07: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#4761
No description provided.