[Feature Request] Please make cpu usage lower
Related problem
OS: Linux CPU: intel x86_64
CPU usage constantly hitting 1% sometimes goes over 2.4% when the app is just sitting idle. I thought processing is only done when there is input event? Usage in the range 0.5 to 0.8% is completely acceptable but it's not at all stable, cause it frequently shoots way beyond the 1% mark and this is bugging me. The high usage also drains the battery; I am using a laptop and saving battery power is crucial! Please work on these issues. Other than that the toolkit is just excellent!
Your request
CPU should be used less when app is hidden or idle.
Alternative solution
No response
Additional context
No response
Related to this, I've found the GUI is updated - the loop function is executed, thus the GUI is redrawn - even when there is no change to any state, i.e. the mouse is NOT moved, or clicked.
This is wasteful, is there a way to prevent this? BTW - this also occurs in cimgui-go
I ran the demo with profiler. Interessting thing is that we have a cgo call that consumes quite a lot of cpu time. I'll have to take a closer look on that.
Here is what I mean:
https://github.com/AllenDang/cimgui-go/pull/428 should make progress on this