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 ?
Thanks, I'll try. I'm worried that this might conflict with rAF on the game side.
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.
Got it. Thanks for giving it a shot.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 ?
Thanks, I'll try. I'm worried that this might conflict with rAF on the game side.
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.
Got it. Thanks for giving it a shot.