undef-engine
2026-03-19
Rate limiter 186x speedup, memray profiling, and broadcast optimization
469 files · 506,105+ · 7,507-
Rate limiter and broadcast performance optimizations
3 files changed
.gitignoreAdded performance artifact ignoresMakefileAdded performance targetsCLI_REFERENCE.mdUpdated CLI reference with perf commands
- Fixed rate limiter O(n) list allocation achieving 186x faster execution and 80% less memory usage streamline behavioral
- Eliminated double session serialization in the game action path streamline internal
- Serialized broadcast messages once instead of per-player to reduce redundant model_dump_json calls streamline internal
- Added session read cache and tightened rate_check threshold streamline internal
Memray memory profiling infrastructure
10 files changed
memray_action_cycle_stress.pyAction cycle memory stress testmemray_analysis.pyMemray analysis utilitiesmemray_broadcast_stress.pyBroadcast memory stress testmemray_game_state_stress.pyGame state memory stress testmemray_locking_stress.pyLocking memory stress testmemray_pubsub_stress.pyPubSub memory stress testmemray_rate_limiting_stress.pyRate limiting memory stress testmemray_serialization_stress.pySerialization memory stress testrun_memray_stress.pyMemray stress test runnerrun_performance_smoke.pyPerformance smoke test runner
- Added memray memory profiling for 6 engine subsystems (action cycles, broadcasts, game state, locking, pubsub, rate limiting)
qualify
internal
4 files
memray_action_cycle_stress.pymemray_broadcast_stress.pymemray_rate_limiting_stress.pyrun_memray_stress.py
- Comprehensive performance testing infrastructure with docs, smoke tests, benchmarks, and CI integration
qualify
internal
1 file
run_performance_smoke.py
HTTP endpoint unit tests
2 files changed
RoomList.tsxUpdated for endpoint testsgame.tsType definition updates
- Added unit tests for session service, tournament routes, screen endpoints, NPC personas, health check, room NPC claim, room settings, room list/detail, room join, room actions, and chat endpoints qualify internal
- Added session management unit tests covering CAS/retry logic qualify internal
- Removed hollow test files that do not exercise production code deprecate internal
Decouple game-specific logic from server infrastructure
1 file changed
RedactingPhase.tsxDecoupled from server infrastructure
Memray optimization results documentation
2 files changed
PERFORMANCE.mdPerformance documentationPERF_BASELINE.mdPerformance baseline documentation