如果TTFB达到5.64s,云函数代码里面也没啥复杂的计算,就一个上传,加iimgSecCheck云调用
exports.main = async (event, context) => { try { const wxContext = cloud.getWXContext(); const ret = await cloud.openapi.security.imgSecCheck({ media: { header: { 'Content-Type' : 'application/octet-stream' }, contentType: 'image/png' , value: Buffer.from(event.imageBuffer) } }); return ret; } catch (err) { console.error(err); return err; } } |
楼主有解决方案吗?
方便看函数执行日志里面运行时间吗