Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(data statistics):add timer to get statistics data #285

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

orangegzx
Copy link
Contributor

No description provided.

@@ -123,12 +124,29 @@ export const dataStatistics = () => {
.then((res: any) => {
const statistics: string = res?.data || ''
nodeStatisticData.value = statistics.replace(/(#)(.*)(\n)/g, '')
setTimer(type, params)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have faced a situation where the interface was still being requested when the component was destroyed, so the timer was not on and therefore not be cleared, and the request was completed after the component was destroyed and the timer was on, so perhaps you could try this to see if there is a hidden problem.

@Kinplemelon Kinplemelon merged commit 1be6247 into master Nov 11, 2022
@Kinplemelon Kinplemelon deleted the perf/gzx/data-statistics branch November 11, 2022 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants