- 小程序冷启动耗时问题?
最近在做小程序冷启动耗时优化,目前碰到几个问题希望帮忙解答,万分感谢。 冷启动做了分包加载后,包下载耗时减少了700ms,但整体冷启动耗时没有什么变化。官方给到的几个的阶段数据和同类均值相当甚至优于同类参考,但总体耗时缺相差1.2s ,这里剩余2.5s耗时主要是包含哪些阶段。[图片]按 “冷启动各阶段耗时指标趋势” 给到的数据来看,资源准备阶段耗时变化非常大,期间没有发过版本,能帮忙确认可能的原因吗,是否可以优化。[图片]同样是 “冷启动各阶段耗时指标趋势” 按版本、场景来看,里面数据竟然有 13.8 s,这个数据合理正常吗 [图片]小程序在加载过程中,如果第一个页面(webview)有跳转,这里统计的冷启动时长是否需要等待跳转后的那个页面ready才算结束时间。
2022-11-15 - we分析,小程序冷启动耗时,资源准备阶段数据异常抖动?
[图片][图片] 近期,小程序两次发版之后,we分析后台冷启动耗时数据抖动异常。 由上图,可以看出,该数据抖动与资源准备阶段耗时抖动相关。 [图片] [图片] 由上图代码包下载耗时及小程序的启动流程,可以看出,资源准备阶段,代码包下载耗时数据为正常波动,无异常抖动。 烦请官方协助排查一下,微信侧最近有无相关调整或者其他原因,导致小程序发版,启动耗时异常抖动。
01-04 - 小程序冷启动时间过长为什么?
[图片] 为什么总启动耗时差这么大? [图片] [图片]
2023-11-03 - 基础库 3.5.6开始报大量js错误,安卓、skyline
安卓、skyline引擎,0828开始出现大量错误 现象:1、安卓手机,微信8.0.51版本,使用普通二维码调起小程序进入指定页面,调用wx.requestPayment无回调,并报下面错误 通过小程序码/链接进入可以正常收到wx.requestPayment回调,该页面切换为webview渲染,可以正常收到回调 2、ios手机,8.0.53版本,普通二维码调起或者小程序码调起,均可以正常收到wx.requestPayment回调,skyline和webview均无问题 [system] Error: nextMicroTaskCallback occur fatal error: {type: "string", description: "[system] Error: nextMicroTaskCallback occur fatal error: ", value: "[system] Error: nextMicroTaskCallback occur fatal error: "} TypeError: Cannot read properties of undefined (reading 'replace') {type: "object", description: "TypeError: Cannot read properties of undefined (reading 'replace')", objectId: "15", className: "TypeError", subtype: "error", preview: {type: "object", description: "TypeError: Cannot read properties of undefined (reading 'replace')", properties: [], overflow: true, subtype: "error"} (in promise) SystemError (appSubContextSDKScriptError) Cannot read properties of undefined (reading 'replace') TypeError: Cannot read properties of undefined (reading 'replace') at (WAServiceMainContext.js:1:2007355) at (WAServiceMainContext.js:1:792535) at Object.cb (WAServiceMainContext.js:1:659611) at H._privEmit (WAServiceMainContext.js:1:104726) at H.emit (WAServiceMainContext.js:1:105016) at Object.cb (WAServiceMainContext.js:1:659721) at H._privEmit (WAServiceMainContext.js:1:104726) at H.emit (WAServiceMainContext.js:1:105016) at T.__onMsgCallback (WAServiceMainContext.js:1:2436057) at T.__onMessageHandler (WAServiceMainContext.js:1:2409965) {type: "string", description: "(in promise) SystemError (appSubContextSDKScriptError)\nCannot read properties of undefined (reading 'replace')\nTypeError: Cannot read properties of undefined (reading 'replace')\nat (WAServiceMainContext.js:1:2007355)\nat (WAServiceMainContext.js:1:792535)\nat Object.cb (WAServiceMainContext.js:1:659611)\nat H._privEmit (WAServiceMainContext.js:1:104726)\nat H.emit (WAServiceMainContext.js:1:105016)\nat Object.cb (WAServiceMainContext.js:1:659721)\nat H._privEmit (WAServiceMainContext.js:1:104726)\nat H.emit (WAServiceMainContext.js:1:105016)\nat T.__onMsgCallback (WAServiceMainContext.js:1:2436057)\nat T.__onMessageHandler (WAServiceMainContext.js:1:2409965)", value: "(in promise) SystemError (appSubContextSDKScriptError)\nCannot read properties of undefined (reading 'replace')\nTypeError: Cannot read properties of undefined (reading 'replace')\nat (WAServiceMainContext.js:1:2007355)\nat (WAServiceMainContext.js:1:792535)\nat Object.cb (WAServiceMainContext.js:1:659611)\nat H._privEmit (WAServiceMainContext.js:1:104726)\nat H.emit (WAServiceMainContext.js:1:105016)\nat Object.cb (WAServiceMainContext.js:1:659721)\nat H._privEmit (WAServiceMainContext.js:1:104726)\nat H.emit (WAServiceMainContext.js:1:105016)\nat T.__onMsgCallback (WAServiceMainContext.js:1:2436057)\nat T.__onMessageHandler (WAServiceMainContext.js:1:2409965)"}
10-15 - 小程序全局配置lazyCodeLoading:'requiredComponents'问题?
当配置了这一项时,小程序仅注入当前页面需要的自定义组件和页面代码,在页面中必然不会用到的自定义组件不会被加载和初始化 ps:添加这项配置后,未使用到的代码文件将不被执行 配置了lazyCodeLoading 导致问题 1.真机调试不能进入小程序 页面空白 [图片][图片] 2.小程序骨架屏 在IED编辑器,体验版开发法版不一致 [图片][图片] app.json 中去掉该配置lazyCodeLoading 显示正常
2020-10-22