Pause rendering, save battery

My mobile app does not change anything on the screen most of the time, but sometimes needs 60 fps. This could be taken advantage of to save CPU/GPU cycles and thus save battery when nothing changes.

In order for the app to remain responsive with a zero frame rate, the input system (touch) has to be decoupled from the rendering loop.

Is this use case supported?

1 Like

I believe the answer is “No”. See my thread about a similar topic here: Any way to pause game/rendering to reduce CPU usage when idle

You could try experimenting with the “set_update_frequency” message, I didn’t explore that very far. It won’t get you to zero, but it might help.

In fact, you should fill an issue with the feature request to make it possible :slight_smile: I would name this mode as “Lazy rendering” or “Eco rendering” because it saves the battery.

Technically it can be implemented and Defold even has almost everything ready (who designed Defold is a genius!). Since render script only forms a queue of commands for the rendering system. Accordingly, if the rendering system calculates hashes for all data that go to rendering, and only then executes all commands for real rendering in GPU, it will be able to automatically determine when it is necessary to redraw the screen and make a flip of the screen buffer, and when not.

7 Likes

Ok, feature request added:

3 Likes