-
-
Couldn't load subscription status.
- Fork 736
Open
Labels
Milestone
Description
Ebitengine Version
Operating System
- Windows
- macOS
- Linux
- FreeBSD
- OpenBSD
- Android
- iOS
- Nintendo Switch
- PlayStation 5
- Xbox
- Web Browsers
Go Version (go version)
go version go1.24.3 darwin/arm64
What steps will reproduce the problem?
- Run this program:
package main
import (
"log"
"net/http"
_ "net/http/pprof"
"github.com/hajimehoshi/ebiten/v2"
)
type Game struct{}
func (self *Game) Layout(w, h int) (int, int) {
return w, h
}
func (self *Game) Update() error {
return nil
}
func (self *Game) Draw(*ebiten.Image) {}
func main() {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
game := &Game{}
ebiten.SetScreenClearedEveryFrame(false)
if err := ebiten.RunGame(game); err != nil {
log.Fatal(err)
}
}- See the CPU usage at Activity Monitor
- Run
What is the expected result?
CPU usages should be much low like 1%
What happens instead?
CPU usages were around 6-8%
Anything else you feel useful to add?
go tool pprof -http=:8081 "http://localhost:6060/debug/pprof/profile?seconds=5" shows that pthread_cond is called many times
