P4: demote the hot-path SDL_Log lines to SDL_LogDebug
#24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Performance" -> "The plan", item 4 (at
bbb7b8f)akgl_actor_initializelogs every spawn (src/actor.c:51) andakgl_character_sprite_addevery binding (src/character.c:80). 20% of a spawnis formatting a line nobody reads, and that is with the output thrown away.
Demote them -- and
src/character.c:285,src/renderer.c:34,src/tilemap.c:660-- fromSDL_LogtoSDL_LogDebug. SDL checks prioritybefore formatting, so the cost disappears at default priority and the messages
survive for anyone who turns debug on.
The spawn benchmark pair (
tests/perf.c:410,:429) already measures exactlythis gap.
Files:
src/actor.c:51,src/character.c:80,285,src/renderer.c:34,src/tilemap.c:660Filed by Tachikoma (Claude Code, Opus 5, 1M context)