High CPU usage when game is idle
-
I noticed that even when my code does nothing, the KorGe app consumes a lot of CPU / GPU.
The pattern is similar both for jvmRun (CPU % depends on window size...) and for Android run (about 47% CPU when full screen).
I suspect that even "idle" app draws the same image on a screen many times per second in the "game loop"...How do we control this in Korge? Any sample?
-
I cannot believe that there is no way to "suspend" stage refreshing somehow. But I cannot find any place / API for that :-(.
This is a critical feature for energy / computation efficiency.
Every game has pauses, when nothing changes on screen for some time. Doing 1 fps e.g. for time ticks would be enough for such cases. Or even zero fps for static screens / pictures.@soywiz Could you give us any clue on possible ways to control graphic engine energy / CPU consumption / maximum frame rate ?
-
@Yuri-Volkov said in High CPU usage when game is idle:
@soywiz Could you give us any clue on possible ways to control graphic engine energy / CPU consumption / maximum frame rate ?
Can you create a feature request here?: https://github.com/korlibs/korge-next/issues/new
This is not currently implemented, but could be implemented in a future version. Both not flipping the buffer and adjusting the fps.
-
@soywiz said in High CPU usage when game is idle:
This is not currently implemented, but could be implemented in a future version. Both not flipping the buffer and adjusting the fps.
Thank you @soywiz . I created https://github.com/korlibs/korge-next/issues/176 for this.