fix: remove repetitive quota refresh interval #180
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
调用的情况下按预期工作。请审查更改,并在一切无误时合并它们。如果需要进行任何进一步的修改,请随时提出。