G
G copied to clipboard
fix: requestIdleCallback won't be triggered when animation is playing
This is a Bug fix, test:browser is fine, but test:server is not ok as the result of the test in the antvis/g/master:
fixed #1948
release 分支上 test:serverside 测试也是这个结果
单测的截图是空白,是预期的嘛?
单测的截图是空白,是预期的嘛?
这个属于已知问题,@HawtinZeng 提交的文件中删掉这个吧
@HawtinZeng 看更新后的代码,似乎与原有的逻辑差不多,只是多了一个 timeout 300 的参数,能确认是这个原因导致的问题吗
确定,开启动画的时候,浏览器线程执行繁忙,不会执行requestIdleCallback的回调,加个超时时间保证能执行。
---Original--- From: @.> Date: Tue, Jun 10, 2025 11:15 AM To: @.>; Cc: "Hawtin @.@.>; Subject: Re: [antvis/G] fix: requestIdleCallback won't be triggered whenanimation is playing (PR #1949)
wang1212 left a comment (antvis/G#1949)
@HawtinZeng 看更新后的代码,似乎与原有的逻辑差不多,只是多了一个 timeout 300 的参数,能确认是这个原因导致的问题吗
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
可能对首屏加载性能造成不利影响,需要再看看如何平衡性能与该问题
把初始化选择器放入 web worker里?
---Original--- From: @.> Date: Fri, Jun 27, 2025 16:20 PM To: @.>; Cc: "Hawtin @.@.>; Subject: Re: [antvis/G] fix: requestIdleCallback won't be triggered whenanimation is playing (PR #1949)
wang1212 left a comment (antvis/G#1949)
可能对首屏加载性能造成不利影响,需要再看看如何平衡性能与该问题
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
把初始化选择器放入 web worker里? … ---Original--- From: @.> Date: Fri, Jun 27, 2025 16:20 PM To: @.>; Cc: "Hawtin @.@.>; Subject: Re: [antvis/G] fix: requestIdleCallback won't be triggered whenanimation is playing (PR #1949) wang1212 left a comment (antvis/G#1949) 可能对首屏加载性能造成不利影响,需要再看看如何平衡性能与该问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
当前的方案只是可能对首屏性能产生影响,同时部分浏览器目前还不支持 timeout 配置项;另外,web worker 难以适配多个环境,并且构建流程比较繁琐,不是最优方案。