Plot panel slows down when displaying too much data
See original GitHub issueDescription As I add a data into the plot, the plot starts drawing slower and slower, eventually can’t work at all.
- Version: v0.15.0
- OS: Studio in Windows 11 with ROS noetic in WSL 2
Steps To Reproduce
Connect to ROS 1 Rosbridge then add anything to the plot
Expected Behavior When I using plot in the webviz
Actual Behavior When I using plot in the Studio
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
How to stop graphics updates from slowing down other loops.
Avoid too many points in one graph. Also avoid locals/globals with big arrays. Use functional globals or shift registers instead. Use panel ...
Read more >Why excel crashes or runs extremely slow when I'm trying to ...
Every time I'm trying to plot engineering data in a plot with multiple series excel slows down, takes ages to respond and crashes....
Read more >Slow Grafana Performance? Learn How to Fix It Using ...
Learn about two common visualization problems in Grafana—slow dashboards and noisy data—and how to fix them using downsampling in ...
Read more >GUI slows down when plotting to figure sequentially
The images and data for the plot are read all at once but displayed sequentially. We have thousands of images to display. When...
Read more >Displaying Large Data - LabVIEW General - LAVA
I attached vi,front panel picture and block diagram picture. ... Have you an idea for overlaying too many plot without slowing? Thank you....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@defunctzombie suggested closing out this bug since we addressed the main issues, and open a new feature to allow toggling point rendering which improves performance.
Longer term we have discussed moving to webGL plots for better performance.
@sink0918 I looked into the slowdown issue while connected to a live stream. The slowdown comes from the underlying charting library (chartjs) we are using for the plot.
The library has two areas which contribute to the slowdown as more and more data is plotted in realtime. One of these is the rendering of the points. Each point is individually rendered and, as the number of points increases on the plot, the time to render the points increases. This issue also impacts webviz; it just takes a little longer than in studio due to the next issue area which is a change in plugin notification handling in chartjs. Webviz uses chartjs v2.9. In studio, we’ve upgraded to chartjs v3. From my profiling of studio, chartjs v3 shows a new slowdown in an internal codepath which delivers notifications to plugins. We use two plugins for our plots (datalabels and zoom). While we could look at removing these or finding alternatives it isn’t quick and not necessarily likely to fix the underlying chartjs notification slowdown.
These two issues: point rendering and plugin notifications are what contribute to the slowdown as more and more data changes on the streaming chart. We can alleviate the point rendering issue by making point rendering a plot option. This will delay when you start to see rendering latency but also impacts features like hovering to see point data.
Unfortunately there is no quick win here like there was with disabling chart animations which were a contributor to the slowdown issue that impacted the sliding window view. For now I recommend using a window size that provides the streaming experience you are comfortable with. I will keep this issue open and this comment will provide further performance guidance when we are able to spend time looking into this.