ios 须要在从新进入小游戏的时候 从新设置 android没有这个问题android
同步版本有可能引起性能问题, requestAnimationFramecanvas
微信小游戏 hello worldapi
import './js/libs/weapp-adapter' let ctx = canvas.getContext('2d') ctx.font = "20px Courier New"; ctx.fillText("hello world", 100, 200)
微信空包 测试10分钟 (值以实际运行为准)微信
三星 S6-Edge 进入内存/业务内存 113M 最低99m 最高120m CPU 3%app
vivo x9 puls 进入内存/业务内存 153M 最低144m 最高155m CPU 1%ide
华为荣耀8青春版 进入内存/业务内存 119M 最低111M 最高123M CPU 0%(读不出来)性能
魅族魅蓝note3 进入内存/业务内存 150M 最低134M 最高148M CPU 3%~7%测试
OPPO R9 进入内存/业务内存147M 最低138M 最高149M CPU 2% ~ 3%
小米8 SE 进入内存/业务内存167M 最低163M 最高175M CPU 0%(读不出来)
内存从最低涨到最高又回到最低
LayaBox空包 测试5分钟 (值以实际运行为准)
三星 S6-Edge 进入内存/业务内存 169M 最低165m 最高183m CPU 14%
vivo x9 puls 进入内存/业务内存 219M 最低194m 最高204m CPU 9%
华为荣耀8青春版 进入内存/业务内存 171M 最低167M 最高179M CPU 0%(读不出来)
魅族魅蓝note3 进入内存/业务内存 241M 最低228M 最高231M CPU 12~14%
OPPO R9 进入内存/业务内存241M 最低237M 最高241M CPU 33%
小米8 SE 进入内存/业务内存261M 最低216M 最高226M CPU 0%(读不出来)
内存从最低涨到最高又回到最低
sprite加载图片的影响 (值以实际运行为准)
图片大小18.9K,分辨率 359 x 360 8位深度 png
LayaBox
case "touchmove":; var touchemoves=evt.changedTouches; for (i=0,n=touchemoves.length;i < n;i++){ touch=touchemoves[i]; if (MouseManager.multiTouchEnabled || touch.identifier==this._curTouchID){ this.initEvent(touch,evt); this._checkAllBaseUI(this.mouseX,this.mouseY,this.onMouseMove); } // 修改 else if (MouseManager.multiTouchEnabled == false) { this.initEvent(touch,evt); } } break ;