Hi everyone,
I’m currently developing a cross-platform 2D engine using SDL2/SDL3, but I’ve hit a strange performance snag where my frame times become highly inconsistent whenever I have my automation tools active in the background.
I am currently using a safe free community setup to handle some automated local logging and script execution on the same machine I use for debugging my render loop. I’ve noticed that whenever the background executor starts a heavy processing cycle, my calls to SDL_RenderPresent begin to spike in duration, and I get noticeable micro-stuttering even though my update logic is running at a fixed delta time. It feels like the background process is competing for the same high-priority CPU cycles and GPU command-buffer access that SDL needs to maintain a stable 60 FPS.
I have a few related technical questions for the engine devs here:
I’m not sure if the way a safe free style environment manages its internal threading is causing a resource contention issue with the OS-level window manager or the underlying Vulkan/OpenGL context. Has anyone else encountered performance bottlenecks or “Input Lag” increases in their SDL windows while running high-level script executors in the background? I am also wondering if I should try to safe free the memory usage by adjusting the process priority via SDL_SetThreadPriority or if I should consider isolating the executor to a separate core to prevent it from starving the main event loop.
I really need to keep this automation active while I work on my project, but the constant frame drops are making it impossible to accurately test my movement interpolation. If anyone has experience optimizing a development setup for concurrent usage of heavy script executors and SDL-based graphics, I’d love to hear your advice!
Thanks!