Hvplot with streamz 100%CPU

Hi,

I’m trying to stream some live data to a dashboard. It’s something like 5 floats per second and that’s not a lot of data to be honest. But still it takes 100% CPU and blocks the eventloop completely.

I thought I’m probably doing something wrong, so I tested this example:
Streaming — hvPlot 0.8.3 documentation (holoviz.org)
If I set the callback period to 200ms CPU in admin panel goes to 100% right away. This makes everything else in the dashboard completely useless.

Has someone successfully streamed data in ~5Hz to a plot without 100% CPU?

Python 3.10.6
Panel: 0.14.4
Bokeh: 2.4.3
Param: 1.12.3
holoviews 1.15.4
hvplot 0.8.2
streamz 0.6.4

Best regards,
Fredrik

1 Like

5 Hz doesn’t sound at all impressive! We’ll be looking at optimizing streaming performance in hvplot+bokeh sometime over the next year, but it’s not currently at the top of our priority list, as we have a lot of other functionality we want in place before such optimization. I suspect something can be improved about it without much work, given how slow that is, but that’s just speculation.

2 Likes

I can confirm the very poor performance. I tried to profile using Panel and the Admin. But it did not work well due to Make it possible to pause updates to “User Profiling” · Issue #4576 · holoviz/panel (github.com).

2 Likes

Ah, I tried checking the profiler too but it was hopeless. A pause would be great there!

Marc do you have some recommended way of adding values to a plot without making the whole system go syrup? :slight_smile:

Best regards,
Fredrik

1 Like