inciteco / tug-of-war

0 stars 0 forks source link

battery hog #4

Closed aaronbuchanan closed 7 years ago

aaronbuchanan commented 7 years ago

@inciteco let's collect more info here, initial thoughts:

I'd have to look into it but I think it's possible that canvas rendering mode is a major contributor? Since canvas is drawn in memory and not on the GPU that's a choke point for lots of devices... Also making sure the DOM enables GPU rendering and we're using requestAnimationFrame where appropriate will help keep things light...

Other than that, off the top I can't think of anything I'd be contributing to here. Some JS profiling should point out the expensive functions if it's our app. (Make sure they didn't have competing apps running in the bg?)

inciteco commented 7 years ago

Tried setting to Phaser.AUTO got this:

https://gist.github.com/inciteco/d7a04299fd10ed03a684a44744b3f1a2

Setting back to CANVAS and deprioritzing this issue.