Skip to content

Commit

Permalink
reduce background CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Jul 1, 2024
1 parent 5821697 commit 03bb69c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/driver/glfw/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ func (d *gLDriver) runGL() {
if f := fyne.CurrentApp().Lifecycle().(*app.Lifecycle).OnStarted(); f != nil {
go f() // don't block main, we don't have window event queue
}
eventTick := time.NewTicker(time.Second / 60)

// reduce background CPU by polling less frequently
// will only affect animation smoothness on ARM Mac (drawOnMainThread)
eventTick := time.NewTicker(time.Second / 30)
//eventTick := time.NewTicker(time.Second / 60)

for {
select {
case <-d.done:
Expand Down

0 comments on commit 03bb69c

Please sign in to comment.