[GH-ISSUE #1219] Server tick work grows with each player: view requeue, chunk tickets, player-area checks #308

Closed
opened 2026-11-02 15:38:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @pirut on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1219

The server thread does more work for each player that joins, in three places that scan instead of looking things up:

  • Hub::update_view rebuilds a player's chunk queue on every chunk crossing by scanning the queue (a Vec) once per chunk of the view: 111 µs per crossing at view distance 10, 6.5 ms at 32.
  • ChunkTickets rebuilds a hash map of every ticketed chunk whenever any player changes chunk, and every block entity, mob and ticking chunk hashes into it.
  • Streaming asks of every loaded and wanted column, several times a tick, whether some player's area reaches it, scanning every player's square per question: 0.45 ms a tick at 50 players and 6081 columns.
Originally created by @pirut on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1219 The server thread does more work for each player that joins, in three places that scan instead of looking things up: - `Hub::update_view` rebuilds a player's chunk queue on every chunk crossing by scanning the queue (a `Vec`) once per chunk of the view: 111 µs per crossing at view distance 10, 6.5 ms at 32. - `ChunkTickets` rebuilds a hash map of every ticketed chunk whenever any player changes chunk, and every block entity, mob and ticking chunk hashes into it. - Streaming asks of every loaded and wanted column, several times a tick, whether some player's area reaches it, scanning every player's square per question: 0.45 ms a tick at 50 players and 6081 columns.
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#308
No description provided.