云函数调用非常慢?
如果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; } } |