Every millisecond counts.
See it sooner. Act sooner. With 1,122 candles and 12 moving averages on screen, KCQ draws each frame in 1.35 ms of main-thread time.
- KLineChartQuantWebGPU1.35ms
- Lightweight ChartsCanvas2D1.36ms
- KLineChartQuantWebGL21.70ms
- KLineChartQuantCanvas2D2.07ms
- KLineChartCanvas2D2.21ms
- Apache EChartsCanvas2D4.74ms
Bars are the mean of 600 frames × 5 rounds; the line spans the fastest and slowest round. A 60 Hz frame is 16.7 ms.
The denser the chart, the clearer the difference.
- 7.4×the candles on screen, from 152 to 1,122. KCQ's cost per frame rises only 8%.
- +7%KCQ's cost per frame going from 5 to 12 moving averages. Apache ECharts's: +65%.
- 3.5×lighter than Apache ECharts, drawing the same screen of candles.
- <9%of a 16.7 ms frame goes to the chart. The rest is yours: strategies, indicators, your agent.
Open and reproducible: method, machine and every frame of raw data
The same candles and moving averages, drawn by each library and scrolled one bar per frame.
Method
- 1Same data: 50,000 seeded one-minute candles under five simple moving averages (5 to 60) or twelve (5 to 300), mounted through each library's public API from a production build.
- 2Same window: KCQ snaps bar width to whole device pixels, so its reachable counts set the tiers and every other library zooms to the same number of visible bars.
- 3Same motion: after warm-up frames, each chart scrolls one bar per frame, in several rounds per library and tier.
- 4The metric: Chrome's main-thread task time divided by frames, which covers script, style, layout and garbage collection. Work in the GPU process is not counted.
- 5Frame rate is not compared: headless Chrome on macOS holds animation frames at 60 Hz. Dropped frames and in-page frame-work percentiles are in the table; in-page timing can miss work a library defers past its frame.
- 6Scenes match on data, not decoration: KCQ and KLineChart also draw their legends and extremum labels, Lightweight Charts and ECharts their defaults.
This run
- Apple M4 Pro · 48 GB · darwin arm64
- ANGLE (Apple, ANGLE Metal Renderer: Apple M4 Pro, Unspecified Version)
- Chrome 155.0.8059.85, headless
- 1180 × 640 at 2× pixel ratio
- @363045841yyt/klinechart-core 0.11.0-alpha.9 · lightweight-charts 5.2.1 · echarts 6.1.0 · klinecharts 10.1.0
- 8f5f1e4f
Every scenario
| Library | Renderer | MAs | Visible bars | Main thread, ms/frame | Round range, ms | Frame work P50, ms | Frame work P99, ms | Dropped frames |
|---|---|---|---|---|---|---|---|---|
| KLineChart | Canvas2D | 5 | 153 | 0.64 | 0.61–0.69 | 1.00 | 1.40 | 0% |
| KLineChartQuant | Canvas2D | 5 | 152 | 0.93 | 0.91–0.95 | 1.80 | 2.10 | 0% |
| Lightweight Charts | Canvas2D | 5 | 151 | 0.93 | 0.79–1.10 | 1.50 | 2.60 | 0% |
| KLineChartQuant | WebGPU | 5 | 152 | 1.73 | 1.52–1.81 | 2.30 | 3.70 | 0% |
| KLineChartQuant | WebGL2 | 5 | 152 | 2.34 | 1.80–2.61 | 3.10 | 4.20 | 0% |
| Apache ECharts | Canvas2D | 5 | 152 | 2.93 | 2.72–3.19 | 3.60 | 4.70 | 0% |
| Lightweight Charts | Canvas2D | 5 | 450 | 0.96 | 0.77–1.30 | 1.70 | 3.00 | 0% |
| KLineChart | Canvas2D | 5 | 452 | 1.03 | 0.88–1.22 | 0.90 | 1.40 | 0% |
| KLineChartQuant | Canvas2D | 5 | 451 | 1.28 | 1.09–2.00 | 1.90 | 4.00 | 0% |
| KLineChartQuant | WebGL2 | 5 | 451 | 1.76 | 1.50–2.00 | 2.40 | 4.30 | 0% |
| KLineChartQuant | WebGPU | 5 | 451 | 1.77 | 1.11–2.12 | 2.10 | 4.00 | 0% |
| Apache ECharts | Canvas2D | 5 | 450 | 4.66 | 4.53–4.84 | 5.30 | 6.00 | 0% |
| KLineChartQuant | Canvas2D | 5 | 1,122 | 1.26 | 1.18–1.35 | 2.10 | 2.80 | 0% |
| Lightweight Charts | Canvas2D | 5 | 1,121 | 1.28 | 0.96–1.57 | 1.80 | 3.10 | 0% |
| KLineChartQuant | WebGL2 | 5 | 1,122 | 1.54 | 1.32–2.00 | 2.10 | 4.00 | 0% |
| KLineChart | Canvas2D | 5 | 1,123 | 1.68 | 1.55–1.84 | 0.95 | 1.40 | 0% |
| KLineChartQuant | WebGPU | 5 | 1,122 | 2.17 | 1.88–2.30 | 2.70 | 4.60 | 0% |
| Apache ECharts | Canvas2D | 5 | 1,119 | 2.87 | 2.82–2.91 | 3.50 | 4.20 | 0% |
| KLineChart | Canvas2D | 12 | 153 | 0.95 | 0.87–1.02 | 1.10 | 1.40 | 0% |
| Lightweight Charts | Canvas2D | 12 | 151 | 1.24 | 0.84–1.48 | 1.80 | 3.20 | 0% |
| KLineChartQuant | Canvas2D | 12 | 152 | 1.25 | 0.95–1.63 | 1.90 | 3.70 | 0% |
| KLineChartQuant | WebGL2 | 12 | 152 | 1.49 | 1.32–1.70 | 2.10 | 3.90 | 0% |
| KLineChartQuant | WebGPU | 12 | 152 | 1.64 | 1.10–1.88 | 2.10 | 4.00 | 0% |
| Apache ECharts | Canvas2D | 12 | 152 | 3.42 | 3.27–3.56 | 4.00 | 4.80 | 0% |
| KLineChartQuant | WebGPU | 12 | 451 | 1.20 | 1.17–1.24 | 1.90 | 2.40 | 0% |
| KLineChartQuant | Canvas2D | 12 | 451 | 1.32 | 1.24–1.38 | 1.90 | 2.70 | 0% |
| Lightweight Charts | Canvas2D | 12 | 450 | 1.36 | 0.95–1.69 | 1.80 | 3.60 | 0% |
| KLineChart | Canvas2D | 12 | 452 | 1.39 | 1.16–1.63 | 1.00 | 1.40 | 0% |
| KLineChartQuant | WebGL2 | 12 | 451 | 1.63 | 1.50–1.81 | 2.20 | 4.00 | 0% |
| Apache ECharts | Canvas2D | 12 | 450 | 5.40 | 5.32–5.44 | 6.10 | 6.90 | 0% |
| KLineChartQuant | WebGPU | 12 | 1,122 | 1.35 | 1.33–1.41 | 2.00 | 2.60 | 0% |
| Lightweight Charts | Canvas2D | 12 | 1,121 | 1.36 | 1.29–1.40 | 2.10 | 2.90 | 0% |
| KLineChartQuant | WebGL2 | 12 | 1,122 | 1.70 | 1.53–1.88 | 2.40 | 4.20 | 0% |
| KLineChartQuant | Canvas2D | 12 | 1,122 | 2.07 | 1.89–2.17 | 2.70 | 4.60 | 0% |
| KLineChart | Canvas2D | 12 | 1,123 | 2.21 | 2.14–2.36 | 0.90 | 1.40 | 0% |
| Apache ECharts | Canvas2D | 12 | 1,119 | 4.74 | 4.54–4.88 | 5.50 | 6.40 | 0% |
Put this speed in your product.
Open source under Apache-2.0. Opens in your browser, no account needed.