inochi-creator icon indicating copy to clipboard operation
inochi-creator copied to clipboard

Experimental: Save CPU When Losing Focus

Open r888800009 opened this issue 1 year ago • 0 comments
trafficstars

TL;DR: Refactor event handling and add performance option

This update saves power without requiring changes to animation and physics animations.

  • Refactored the event handling in the incBeginLoop function to use a state machine for managing poll and wait modes, reducing CPU usage when the application is not focused.
  • Added a new performance option in the settings window called Render Only When Window Focused. Enabling this option stops rendering when the window loses focus, further reducing CPU usage.
  • This feature is enabled by default

Related issue: https://github.com/nijigenerate/nijigenerate/issues/21

r888800009 avatar Sep 12 '24 02:09 r888800009