Skip to content

[Bug] Pie chart with large data has performance issue. 大数据量下饼图存在性能问题 #17173

@LeoB-O

Description

@LeoB-O

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结果是可以被复用的。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions