github JRickey/BattleShip v0.9.2-beta

6 hours ago

@

Performance Fix

This is a focused performance release on top of v0.9.1-beta.

Busy scenes — fights with several fighters plus particles and a stage — were dropping to ~30 fps while menus and the title screen stayed smooth. The cause was the stale-DL safety guard: port_dl_check_addr runs once per GBI command in the innermost renderer loop, and it was taking a std::mutex and linear-scanning the DL-range registry on every command. The more display-list commands a frame pushed, the worse it got — exactly the fight case.

The registry only changes at file load/unload, so the per-command path now uses a generation-validated thread-local single-entry hit cache: two comparisons and one relaxed atomic load in the common case, no mutex and no scan. Any registry change bumps the generation and invalidates stale cached ranges; misses and the walked-past/unknown paths still fall through to the original locked scan, so crash-guard classification behavior is unchanged.

Net effect: full-frame-rate busy fights with no loss of the stale-data crash protection introduced in v0.9.1-beta.

What's Changed

  • perf(gfx): drop per-GBI-command mutex+scan in DL bounds check by @JRickey in #187

Full Changelog: v0.9.1-beta...v0.9.2-beta
@

What's Changed

  • perf(gfx): drop per-GBI-command mutex+scan in DL bounds check by @JRickey in #187

Full Changelog: v0.9.1-beta...v0.9.2-beta

Don't miss a new BattleShip release

NewReleases is sending notifications on new releases.