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

setOption takes most of the execution time in clone function #17656

Closed
JakubRaban opened this issue Sep 15, 2022 · 2 comments
Closed

setOption takes most of the execution time in clone function #17656

JakubRaban opened this issue Sep 15, 2022 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature. stale Inactive for a long time. Will be closed in 7 days.

Comments

@JakubRaban
Copy link

JakubRaban commented Sep 15, 2022

Version

5.3.3

Link to Minimal Reproduction

No response

Steps to Reproduce

Create a line chart with a few series and animations turned off which is periodically updated (in my example every 100ms) using setOption function by supplying the entire history of data for the visible period of time:

chart.setOption({
  series: dataHistoryForAllSeries.map(dp => ({ data: dp }))
})

Every series has around 100 000 data points

Current Behavior

Recently I created a demo app to check whether echarts would fit my team's use case. In our application we have multiple history graphs with varying time intervals which are first pre-filled with historical data and then updated with varying frequency, sometimes as often as every 100ms. I do it similarly to what examples show (that is, old data is removed, new data is pushed and entire array is supplied to series.data in setOption). When profiling the app, I realized that a big part of setOption's execution time is spent on cloning (function called clone). The rest seems like a small part compared to that. I'd like to know whether data could be passed in another way in which the performance would be hurt less, or whether it's something that could be improved on your side.

Analysing one of the function calls from the screenshot below:

  • total setOption execution time: 107.93 ms
  • approximate time spent in some cloning function: 54.26 ms
    time

Expected Behavior

Reduction of setOption execution time

Environment

- OS: Fedora Linux 35
- Browser: Chrome 103
- Framework: Angular

Any additional comments?

No response

@JakubRaban JakubRaban added the bug label Sep 15, 2022
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Sep 15, 2022
Copy link
Contributor

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

@github-actions github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Sep 14, 2024
Copy link
Contributor

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature. stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

1 participant