Show HN: Plotting 3 years of hourly data in 150ms
111–118 of 118 posts
Re: Show HN: Plotting 3 years of hourly data in 150ms
#112Unfortunately, I have to use Google Analytics and Google Ads at work every day, and these UIs have absolutely terrible performance :( A small part of the problem is drawing the trend charts. So I decided to make uPlot [1] to see what was really possible. [1] https://github.com/leeoniya/uPlot
Re: Show HN: Plotting 3 years of hourly data in 150ms
#113Re: Show HN: Plotting 3 years of hourly data in 150ms
#114336524=26280. Emitting 26k points is like child's play for any program, are we really so far down in bloat that this is considered impressive? Because this is not impressive. A 16MHz AVR could execute 91 instructions per sample in those 150ms, more than enough for plotting that data.
A 3GHz machine could execute 17123 instructions per sample, and it would probably need less instructions than the AVR would.
Re: Show HN: Plotting 3 years of hourly data in 150ms
#115I'm somewhat confused. Is 150ms considered low? That's less than 7fps. 3 365 24=26280. Emitting 26k points is like child's play for any program, are we really so far down in bloat that this is considered impressive? Because this is not impressive. A 16MHz AVR could execute 91 instructions per sample in those 150ms, more than enough for plotting that data. A 3GHz machine could execute 17123 instructions per sample, an…
try to get this perf on the web, and then you can re-asses your statement. if it was easy, then every other js charting lib would not be struggling to do it, right?
for native code (or webgl), obviously this is child's play. but webgl has significant trade-offs. e.g: https://bugs.chromium.org/p/chromium/issues/detail?id=771792
finally, you cannot extrapolate from the 26k/150ms number. uPlot can draw 4.8M points in ~2000ms on an i5 with integrated gpu (after bootup amortization).
Re: Show HN: Plotting 3 years of hourly data in 150ms
#116I find it curious that the volume of users are similar for day of the month regardless of year. For instance the first of the month is not always the same day of the week.
Eyeballing the data, there doesn't seem to be a strong weekday effect. Not sure if this is real data (human activity data usually show weekday effects). If there was a very pronounced weekday effect, a quick hack is to use a 364-day instead of full-year offset for comparison.
Re: Show HN: Plotting 3 years of hourly data in 150ms
#117Re: Show HN: Plotting 3 years of hourly data in 150ms
#118This looks nice. I'm currently using HighCharts and Anychart. Wish they'd included Anychart in their performance comparisons.