[GH-ISSUE #4135] Breaking and placing End crystals feels super slow in single player #1213

Open
opened 2026-11-02 15:45:08 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Visivel on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4135

Here's an showcase of placing and breaking end crystals:
https://streamable.com/f4m9pr

Originally created by @Visivel on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4135 Here's an showcase of placing and breaking end crystals: https://streamable.com/f4m9pr
Author
Owner

@DUzzL commented on GitHub (Oct 30, 2026):

/claim

🤖 Agent: DUzzL's AI agent is looking into this.

<!-- gh-comment-id:6512808658 --> @DUzzL commented on GitHub (Oct 30, 2026): /claim 🤖 Agent: DUzzL's AI agent is looking into this.
Author
Owner

@DUzzL commented on GitHub (Oct 30, 2026):

/unclaim

🤖 Agent: DUzzL's AI agent read the crystal place/break path (client click handling, remote attack/use, integrated-server guest attack/place, crystal sync) and found no crystal-specific delay or blocking wait; the click-delay logic matches vanilla. One structural candidate, unconfirmed without a run: in game/lan.rs tick_lan the entity states are built before the guests' packets are applied (lan/hub.rs tick_level processes the inbox, then track_entities broadcasts the stale list, and the host applies the resulting events afterwards), so every entity spawn/removal a guest action causes (a placed or destroyed crystal) reaches the client one server tick (50 ms) late. That would need a split of tick_level around the event handling, too invasive to do blind. Releasing the claim.

<!-- gh-comment-id:6512853666 --> @DUzzL commented on GitHub (Oct 30, 2026): /unclaim 🤖 Agent: DUzzL's AI agent read the crystal place/break path (client click handling, remote attack/use, integrated-server guest attack/place, crystal sync) and found no crystal-specific delay or blocking wait; the click-delay logic matches vanilla. One structural candidate, unconfirmed without a run: in `game/lan.rs tick_lan` the entity states are built before the guests' packets are applied (`lan/hub.rs tick_level` processes the inbox, then `track_entities` broadcasts the stale list, and the host applies the resulting events afterwards), so every entity spawn/removal a guest action causes (a placed or destroyed crystal) reaches the client one server tick (50 ms) late. That would need a split of tick_level around the event handling, too invasive to do blind. Releasing the claim.
Author
Owner

@WhyFovius commented on GitHub (Nov 2, 2026):

/claim

<!-- gh-comment-id:6583672300 --> @WhyFovius commented on GitHub (Nov 2, 2026): /claim
Author
Owner

@WhyFovius commented on GitHub (Nov 2, 2026):

🤖 Agent: Verified on current main (2050c4e0f): the structural candidate from the earlier read here is fixed, and the fix is recent.

game/lan.rs now has a tick_lan_packets phase that runs at the start of tick_lan: it drains and applies the guests' packets (place/attack/use, tick_guests finishing mining and pickups) before the entity states are built. The states snapshot that track_entities broadcasts is therefore taken after this tick's packets are applied, so a crystal a guest places or breaks is described to clients in the same server tick. The comment in tick_lan states the invariant directly: "Finish the players' mining, item use and pickups before describing this tick to their clients. Otherwise a newly broken block and its drops remain absent from the snapshot until the following tick."

The ordering landed with #6404 (commit 354e2e632, "Send player mining drops in the same server tick", merged 2026-11-01). The report's build predates that merge, which fits the one-tick-per-response latency in the video. I could not run the game locally to confirm by hand (no vanilla data on this machine); the code path is unambiguous though. Unclaiming — nothing left to do here on current main. If a nightly >= 2026-11-02 still feels slow, reopen with a fresh recording and the tick_lan_packets ordering is the wrong suspect.

<!-- gh-comment-id:6584517391 --> @WhyFovius commented on GitHub (Nov 2, 2026): 🤖 Agent: Verified on current main (2050c4e0f): the structural candidate from the earlier read here is fixed, and the fix is recent. `game/lan.rs` now has a `tick_lan_packets` phase that runs at the start of `tick_lan`: it drains and applies the guests' packets (place/attack/use, `tick_guests` finishing mining and pickups) *before* the entity states are built. The states snapshot that `track_entities` broadcasts is therefore taken after this tick's packets are applied, so a crystal a guest places or breaks is described to clients in the same server tick. The comment in `tick_lan` states the invariant directly: "Finish the players' mining, item use and pickups before describing this tick to their clients. Otherwise a newly broken block and its drops remain absent from the snapshot until the following tick." The ordering landed with #6404 (commit 354e2e632, "Send player mining drops in the same server tick", merged 2026-11-01). The report's build predates that merge, which fits the one-tick-per-response latency in the video. I could not run the game locally to confirm by hand (no vanilla data on this machine); the code path is unambiguous though. Unclaiming — nothing left to do here on current main. If a nightly >= 2026-11-02 still feels slow, reopen with a fresh recording and the `tick_lan_packets` ordering is the wrong suspect.
Author
Owner

@WhyFovius commented on GitHub (Nov 2, 2026):

/unclaim

<!-- gh-comment-id:6584518084 --> @WhyFovius commented on GitHub (Nov 2, 2026): /unclaim
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#1213
No description provided.