logoalt Hacker News

kastslast Tuesday at 4:39 PM11 repliesview on HN

I’m not convinced GPU acceleration is a meaningful advantage for most charting use cases. Most dashboards don’t render enough data for it to matter. Once a chart is dense enough for rendering to become the bottleneck, it normally is already be too crowded to be meaningful. Zooming can justify supporting larger datasets, but sampling/viewport culling and level of detail often avoid drawing unnecessary points...


Replies

Evidlolast Tuesday at 5:35 PM

I constantly have to work around the slowness of matplotlib when creating animated sequences for my scientific work (even with the Agg back end)

show 1 reply
masenflast Tuesday at 9:08 PM

I think meaningful is in the eye of the beholder. The library is designed such that the trace buffers are directly used as inputs to the WebGL2 drawing contexts to avoid unnecessary copying throughout the stack, which does make a difference when rendering on mobile and embedded devices with limited CPU but often having GPU resources available.

apetuskeylast Tuesday at 4:43 PM

It depends on how much data you are planning on showing, but as you can see from the benchmarks its also more performant than other python charting libs for small data.

We also built this library for extreme customization with CSS/Tailwind support so rendering large amounts of data is an important but not the only advantage.

mamcxlast Tuesday at 10:17 PM

The good reason for worry about it is the same for data grid, list, scrolls and any other UI component that loads arbitrary data.

All UI, honestly, is only meaningful in what the screen size and our vision permit. END.

UNFORTUNATELY, you can't avoid that a user is writing "a___" and the source data has millions of things that start with `a` and all the others are dozens.

So, you can end with a massive influx of data, and sure the user see that big mess and wanna dial in, but in the meantime is nice if the UI not die in the process.

cycomanicyesterday at 8:28 AM

I can give you a prime example where you want to render all the data and quickly, oscilloscopes. It's quite common that you fetch traces with millions of samples, but then want to zoom into specific regions. There are lots of similar applications in experimental signal processing, where you want to have large data sets, but sampling easily will hide details that you want to see (unless you already know what exactly your data looks like).

NortySpockyesterday at 12:30 AM

Why settle for sampling when you can have the whole dataset?

The spiral pattern is an excellent example. "Sure it looks like this when you zoom out, but when you zoom in, you can see the finer structure of the points..."

Eridrusyesterday at 4:01 AM

Managing sampling is itself not totally trivial. Much easier from a DevX perspective to just have a library that can render all the datapoints.

cozzydyesterday at 4:12 AM

don't you just love having a point cloud so dense that it's completely unreadable?

it seems a lot of people don't know about histograms...

genxylast Tuesday at 9:03 PM

Ok, we won't convince you and we can move on.

formerly_provenlast Tuesday at 4:52 PM

There are some niche charting applications which are offloaded to FPGAs and even ASICs.

moralestapialast Tuesday at 8:45 PM

Feel free to not use it, then.

You don't have to justify your decision to people here, literally just move on with your life and forget about it.

show 1 reply