DEV Community

Discussion on: GopherJS vs WebAssembly for Go

Collapse
 
agnivade profile image
Agniva De Sarker

Can you try replacing setTimeout in L307 of wasm_exec.js (github.com/golang/go/blob/master/m...) with requestAnimationFrame and see if that gives any boost in performance ?

Collapse
 
hajimehoshi profile image
Hajime Hoshi

Thanks, I'll try. I'm worried that this might conflict with rAF on the game side.

Collapse
 
hajimehoshi profile image
Hajime Hoshi

My worry was right: FPS is now up to 30 when the number of sprites are small (e.g. 100 or so), while FPS was 60 before the fix.

Thread Thread
 
agnivade profile image
Agniva De Sarker

Got it. Thanks for giving it a shot.