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

Additional performance benchmarks #1

Closed
benmccann opened this issue Oct 9, 2019 · 4 comments
Closed

Additional performance benchmarks #1

benmccann opened this issue Oct 9, 2019 · 4 comments
Labels
docs Improvements or additions to documentation

Comments

@benmccann
Copy link
Contributor

ZingChart utilizes canvas, so would be interesting to add to the benchmark.

Also, I noticed Highcharts was listed. I think it'd be interesting benchmark it with the boost module as well.

@leeoniya
Copy link
Owner

leeoniya commented Oct 9, 2019

ZingChart utilizes canvas, so would be interesting to add to the benchmark.

will do!

Also, I noticed Highcharts was listed. I think it'd be interesting benchmark it with the boost module as well.

it uses it already [1]. i based it on one of the boost examples, but maybe more param tweaking [2] can make it faster. i didn't spend additional time trying to figure it out. feel free to contribute any improvements!

[1] https://github.com/leeoniya/uPlot/blob/master/bench/Highcharts.html#L14
[2] https://www.highcharts.com/docs/advanced-chart-features/boost-module

leeoniya added a commit that referenced this issue Oct 9, 2019
leeoniya added a commit that referenced this issue Oct 9, 2019
@leeoniya
Copy link
Owner

leeoniya commented Oct 9, 2019

added ZingChart based on [1], i'll add the interaction metric later (need to tweak config to display live values and hovered datapoints), but i don't expect any surprises.

it should be noted that the article makes reference to an evenly-spaced-data optimization and the bench dataset is mostly evenly spaced since the sampling interval in cron was 1m (but it could be +/- 1s in final timestamps). however, uPlot's performance does not depend on the data being evenly spaced whatsoever, so i chose not to use this "optimization" in the bench.

if you're curious how that version performed: 1310ms render, 1500ms total, 96.8 MB mem.

[1] https://blog.zingchart.com/charts-with-time-series-data/

@leeoniya leeoniya added the docs Improvements or additions to documentation label Oct 10, 2019
@benmccann
Copy link
Contributor Author

That's great! Thanks so much for adding the additional benchmarks!

I'm going to send some improvements to the Chart.js benchmark later. How do you do the timings? Do you just look in the Chrome developer tools performance tab? Or should I just send the improvements and let you update the timings?

@leeoniya
Copy link
Owner

I'm going to send some improvements to the Chart.js benchmark later.

nice, looking forward to it!

How do you do the timings? Do you just look in the Chrome developer tools performance tab?

  • Render (167k) is taken from the readout of console.timeEnd('chart'); [1]. I ensure that there's no async magic happening and that timeEnd event visually coincides with the last paint event.
  • Total & JS Heap is a Chrome devtools perf timeline recording of a page reload.
  • Interact (10s) is me furiously tracing a horizontal figure 8 across the width/height of each chart with live label & hovered datapoint updates enabled...for ~10s.

I try to do a few runs and force garbage collection between them to get the most representative/fair numbers. It's not terribly scientific, but with such large deltas between libs it doesn't really need to be.

Or should I just send the improvements and let you update the timings?

i'm sure you'll be interested in the timings on your own machine relative to some baseline. but obviously i'll re-run them on the same machine as the others either way.

[1] https://github.com/leeoniya/uPlot/blob/master/bench/uPlot.html#L124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants