Eliminate rollback-loop allocations and replay scans #20

Closed
opened 2026-09-15 16:42:57 +00:00 by EIREXE · 0 comments
Owner

Severity: Performance

Bone pose updates allocate scratch/output vectors per fighter frame at src/fighter/baked_animation.rs:331-351. Air collision allocates and sorts every candidate at src/fighter/collision.rs:48-74. Replay playback linearly scans all frames/checksums at src/replay.rs:223-227 and :249-253, producing quadratic playback behavior.

Fix: reuse buffers, select collision hits without allocation/sort, and index validated replay frames directly.

Severity: Performance Bone pose updates allocate scratch/output vectors per fighter frame at src/fighter/baked_animation.rs:331-351. Air collision allocates and sorts every candidate at src/fighter/collision.rs:48-74. Replay playback linearly scans all frames/checksums at src/replay.rs:223-227 and :249-253, producing quadratic playback behavior. Fix: reuse buffers, select collision hits without allocation/sort, and index validated replay frames directly.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: EIREXE/shinespark#20