You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is easily tested by measuring time between frames, creating a window, and moving the window behind another window.
The frame time will drop to around 0. This effectively busy-loops and can quickly heat up a laptop or drain battery. I encountered a version of this issue (with a library similar to glutin) where I left a program running with my laptop closed and came back and it was super hot.
This is an issue other similar libraries have encountered as well: libsdl-org/SDL#1871
Their solution was to insert a sleep when the window is not visible.
This is easily tested by measuring time between frames, creating a window, and moving the window behind another window.
The frame time will drop to around 0. This effectively busy-loops and can quickly heat up a laptop or drain battery. I encountered a version of this issue (with a library similar to
glutin
) where I left a program running with my laptop closed and came back and it was super hot.This is an issue other similar libraries have encountered as well:
libsdl-org/SDL#1871
Their solution was to insert a sleep when the window is not visible.
I put together a small repository that reproduces this issue: https://github.com/kettle11/winit_framerate_test
The text was updated successfully, but these errors were encountered: