Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leeoniya
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
73 ms
·
901.
▲
by
leeoniya
7y ago
AnyChart uses SVG, so it will be about the same place as Highcharts, but likely slower.
902.
▲
by
leeoniya
7y ago
FWIW, the majority of this 150ms is bootup time and includes initializing the DOM & canvas, JITing the js, downloading & parsing the dataset, and actually running the code, which includes data downsampling & gap detection/c
903.
▲
by
leeoniya
7y ago
hey adam :) it's highly dependent on what's actually drawn. i regressed it by accident and didnt notice a huge difference until i randomly opened the stress test (which is also densely packed so probably a worst case for AA)[1].
904.
▲
by
leeoniya
7y ago
another one i forgot - drawing at exact aligned pixel boundaries to avoid or minimize antialiasing this makes uPlot charts a bit rougher looking, but the perf impact is quite large.
905.
▲
by
leeoniya
7y ago
oh, and another one is in here [1] which turns the legend into the tooltip :) [1] https://leeoniya.github.io/uPlot/demos/candlestick-ohlc.html
906.
▲
by
leeoniya
7y ago
> but I would much prefer if my CPU stopped chewing after web pages were loaded and rendered. this happens when it's programmed with performance as an afterthought, which is sadly how things work when the prerogative is to just ship
907.
▲
by
leeoniya
7y ago
there's this, but it looks stalled: https://github.com/grafana/grafana/pull/21835
908.
▲
by
leeoniya
7y ago
can you open an issue with a repro?
909.
▲
by
leeoniya
7y ago
> but I just want to randomly point out that 3 years of hourly data is really not as much, as it may sound to somebody. you're right, it isn't. and yet many js charting libs struggle even with this. on my i5 thinkpad with integ
910.
▲
by
leeoniya
7y ago
maybe they're Stingrays ;) https://en.m.wikipedia.org/wiki/Stingray_phone_tracker
911.
▲
by
leeoniya
7y ago
> And this graph has probably around ~194k data points no, the top graph is pretty much what the title says: 3 * 365 * 24. but 194k is also no problem :)
912.
▲
by
leeoniya
7y ago
probably, but something about diminishing returns...:p
913.
▲
by
leeoniya
7y ago
the bench code uses the boost module. so it's apples-to-apples: https://github.com/leeoniya/uPlot/blob/master/bench/Highchar...
914.
▲
by
leeoniya
7y ago
> I'll have to look at the code later, but I'm curious about where this library is getting the performance from. https://news.ycombinator.com/item?id=23047156
915.
▲
by
leeoniya
7y ago
a few things: - the data is flat arrays of numbers - there is no per-datapoint memory allocation beyond whatever is necessary for the browser to construct the canvas Path2D object. this keeps the memory pressure low and the GC nearly silent
916.
▲
by
leeoniya
7y ago
completely agree. additionally, it's hard to overstate how impressive modern javascript JITs are, as well as GPUs. every time i visit a web page that downloads 2MB of js and spins up my CPU fan, i feel ashamed that this is the industry
917.
▲
by
leeoniya
7y ago
i don't have dygraphs demo for this, but you can see where it lands on the 166k bench: https://github.com/leeoniya/uPlot#performance
918.
▲
by
leeoniya
7y ago
but really tricky to align correctly at different screen pixel densities and rounding errors. it's still not pixel-perfect, but i decided it was good enough.
919.
▲
by
leeoniya
7y ago
there are a couple tooltip demos here: https://leeoniya.github.io/uPlot/demos/tooltips.html https://leeoniya.github.io/uPlot/demos/cursor-tooltip.html
920.
▲
by
leeoniya
7y ago
interestingly, focusing on performance in web dev (and actually delivering on it) really presents new UI challenges, because users are not used to near instantaneous feedback in web-apps. you have to start adding complexity like css transit
921.
▲
by
leeoniya
7y ago
Bokeh looks cool, too.
922.
▲
by
leeoniya
7y ago
coincidentally, i posted this not too long ago: https://news.ycombinator.com/item?id=23045207
923.
▲
by
leeoniya
7y ago
drag. double-click to reset zoom.
924.
▲
by
leeoniya
7y ago
https://github.com/leeoniya/uPlot#performance
925.
▲
by
leeoniya
7y ago
it's an understatement for sure :) a lot of time is spent on just DOM layout and JITing the JS, which get amortized with huge datasets. the 166k bench doesnt take any longer.
926.
▲
by
leeoniya
7y ago
thanks!
927.
▲
by
leeoniya
7y ago
> Question: in the demo you load papaparse but the data is delivered as JSON? good catch, leftovers from original PoC i made locally. the exported data was still in CSV back then. i should clean that up! > Would you mind sharing what
928.
▲
by
leeoniya
7y ago
Unfortunately, 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 re
929.
▲
Show HN: Plotting 3 years of hourly data in 150ms
(leeoniya.github.io)
785 points
by
leeoniya
7y ago
|
102 comments
930.
▲
by
leeoniya
7y ago
fwiw, i run debian unstable in production for 6+ years, updating every few weeks, with 0 issues. i would assume that testing should be rock solid.
More ›