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

[Bug] echarts性能图表options构造存在性能问题 #277

Closed
2 tasks done
aoliaoaoaojiao opened this issue Mar 26, 2024 · 1 comment
Closed
2 tasks done

[Bug] echarts性能图表options构造存在性能问题 #277

aoliaoaoaojiao opened this issue Mar 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aoliaoaoaojiao
Copy link
Member

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

一直存在

Deploy platform

Windows

Minimal reproduce step

打开性能监控,随时间页面越来越卡,类似如下的代码
data: props.procFps.map((obj) => { return moment(new Date(obj.timeStamp)).format('HH:mm:ss'); }),
每次有新的性能数据传输过来的时候,会新构建出一个array数组,随着时间越来越长,该map的长度也越来越大,最后构建出数组的速度也越来越慢,还会伴随着碎片内存的产生,也增加了GC的压力。不应该使用Map生成数组,而是应该有固定的数组初始化,每次接收数据push到数组中,然后直接将数组设置给echarts的对应options结构中。

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!
@aoliaoaoaojiao aoliaoaoaojiao added the bug Something isn't working label Mar 26, 2024
@aoliaoaoaojiao aoliaoaoaojiao changed the title [Bug] echarts性能图标options构造存在性能问题 [Bug] echarts性能图表options构造存在性能问题 Apr 1, 2024
@ZhouYixun
Copy link
Member

#297 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants