Skip to content

perf(game): streamline room state and delivery - #12

Draft
lguibr wants to merge 1 commit into
mainfrom
refactor/room-performance
Draft

perf(game): streamline room state and delivery#12
lguibr wants to merge 1 commit into
mainfrom
refactor/room-performance

Conversation

@lguibr

@lguibr lguibr commented Sep 7, 2026

Copy link
Copy Markdown
Owner

The backend now keeps physics state in each room, uses reliable internal messaging and independent bounded socket writers, and sends full grids only on admission or mutation. This fixes stale entity-state replies, admission and cleanup races, and slow-client broadcast stalls while preserving the client JSON protocol.

At 200 local simulated clients, outgoing traffic and combined-process allocation volume fell approximately 89%, with approximately 40 position updates per second maintained. Sampled CPU time fell 69%. The performance report documents methodology and limits.

Validation: go test -race ./... -count=1 -timeout 120s passed. Independent review passed with only minor legacy-comment cleanup deferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant