小游戏发送消息太耗时,求大神指点
var t1 = Date.now();
this.socketTask.send({data : buf})
var t2 = Date.now();
cc.log(this.__instanceId, “send cost ++++++++++++++++++++++”, t2 - t1);
发现在android真机,平均耗时10多ms 导致帧率下降很多
var t1 = Date.now();
this.socketTask.send({data : buf})
var t2 = Date.now();
cc.log(this.__instanceId, “send cost ++++++++++++++++++++++”, t2 - t1);
发现在android真机,平均耗时10多ms 导致帧率下降很多