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] Pie chart with large data has performance issue. 大数据量下饼图存在性能问题 #17173

Closed
LeoB-O opened this issue Jun 7, 2022 · 2 comments · Fixed by #17275
Closed

Comments

@LeoB-O
Copy link

LeoB-O commented Jun 7, 2022

Version

5.3.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=pie-legend

Steps to Reproduce

Change the params of genData in the reproduction link (default value is 50) to bigger value (eg. 1000)
将复现链接中genData函数的参数(默认是50)替换为更大的值(例如1000)

Current Behavior

page stuck
页面卡顿

Expected Behavior

render takes shorter time
渲染更迅速

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Seems like the function getPercentWithPrecision is called too many times, even though all the params is same (except idx). The result of seats can be reused.

看起来getPercentWithPrecision函数被调用了太多次,每次调用传的参数都是一致的(除了idx)。计算出来的seats结果是可以被复用的。

@LeoB-O LeoB-O added the bug label Jun 7, 2022
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Jun 7, 2022
@echarts-bot
Copy link

echarts-bot bot commented Jun 7, 2022

@LeoB-O It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] Pie chart with large data has performance issue.

BODY

Version

5.3.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=pie-legend

Steps to Reproduce

Change the params of genData in the reproduction link (default value is 50) to bigger value (eg. 1000)
Replace the argument of the genData function in the recurrence link (50 by default) with a larger value (e.g. 1000)

Current Behavior

page stuck
Page stuttering

Expected Behavior

render takes shorter time
Renders faster

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Seems like the function getPercentWithPrecision is called too many times, even though all the params is same (except idx). The result of seats can be reused.

It seems that the getPercentWithPrecision function has been called too many times, and the arguments passed each time are called the same (except for idx). The calculated seats results are reusable.

@plainheart plainheart added performance topic: pie and removed bug pending We are not sure about whether this is a bug/new feature. labels Jun 7, 2022
@Ovilia
Copy link
Contributor

Ovilia commented Jun 8, 2022

Pie charts are not expected to have large amount number of data. https://echarts.apache.org/examples/zh/editor.html?c=pie-legend is an example to show how legend paging works but from the perspect of data visualization, it's definitely a bad example of pie charts. This is because when there are a lot of data, the pie pieces are hard to tell which data is bigger and how much bigger they are to each other. It is better to use bar charts to show the difference.
For that reason, this performance issuse may not be prioritized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants