Closed eddsi closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
chatnio | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 29, 2024 9:12am |
非常感谢 PR。此问题减少了轮询请求订阅和点数请求的方案,替换为事件响应,目前因为还有其他地方也使用useSelector
引用了quota
, subscriptionData
的信息,这些引用没有被出发更新请求事件,可能会导致显示错误,需要再增加补丁。等我忙完这段时间之后,改进此 PR 并 merge。
bug report:
It's been reproduced. revert first.
Description:
Summary
This pull request addresses the issue of unnecessary repetitive quota and subscription refresh intervals in our codebase. By removing the redundant
setInterval
calls, we optimize performance and reduce potential overhead caused by frequent state updates.Changes
setInterval
function that triggersrefreshQuota(dispatch)
every 5000 milliseconds.setInterval
function that triggersrefreshSubscription(dispatch)
every 10000 milliseconds.Impact
Tests
setInterval
calls.Please review the changes and merge them if everything is in order. Feel free to ask for any further modifications if needed.
描述:
概述
此 Pull Request 解决了我们代码库中不必要的重复配额与订阅刷新间隔问题。通过移除多余的
setInterval
调用,我们优化了性能并减少了因频繁状态更新可能造成的开销。更改内容
refreshQuota(dispatch)
的setInterval
函数。refreshSubscription(dispatch)
的setInterval
函数。影响
测试
setInterval
调用的情况下按预期工作。请审查更改,并在一切无误时合并它们。如果需要进行任何进一步的修改,请随时提出。