apache / apache/echarts

[Bug] Performance under dynamic update of massive data

Open
#16,838 0 comments 0 reactions 0 assignees View on GitHub
bug en
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.2

### Link to Minimal Reproduction

https://stackblitz.com/edit/web-platform-2anuwg

### Steps to Reproduce

1. create a chart with `5 xAxis`, `5 yAxis`, `8 series(1 candlestick, 2 bar, 5 line)`, `1 dataset(13306 length)`;

2. Add one piece of data every 500ms;

> demo index.html:396
```typescript
setInterval(() => {
myChart.setOption({
dataset: [
{
source: getDataSource(),
seriesLayoutBy: 'column'
},
],
});
}, 500);
```

### Current Behavior

### Charts become stuttering and dropped frames.

👉 Very high performance overhead

> Chromium Devtools Performance monitor

![image](https://user-images.githubusercontent.com/22147095/161915827-58c0161e-d63b-4ef9-804f-123ec599bdb7.png)

👉 Especially when dragging the chart left and right

> Chromium Devtools Performance monitor

![image](https://user-images.githubusercontent.com/22147095/161916219-1cf8c177-e6eb-46ae-96ca-8951f76002cc.png)

👉 Every update takes at least 400ms.

> Chromium Devtools Performance log

![image](https://user-images.githubusercontent.com/22147095/161916636-d7655223-80b9-4356-a856-410514d24d4b.png)

![image](https://user-images.githubusercontent.com/22147095/161917531-4facc335-849a-4159-8a58-d0f9ba66a2ed.png)

### Expected Behavior

### Smooth dragging and lower performance overhead

Dataset source can be updated incrementally

### Environment

```markdown
- OS: Windows 10 Pro 21H2
- Browser: Google Chrome 100.0.4896.75
- Framework: Angular@11.2.4
```

### Any additional comments?

Echarts is used to display the k-line and several studies(Volume, RSI, MACD, KD) in my real business scenario.
The latest data is updated every 500ms and the indicators are recalculated last each time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.