cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.06k stars 414 forks source link

Live viewer bogs down after time and data #312

Open defied opened 4 years ago

defied commented 4 years ago

Currently, while running webviz connected to a rosbag websocket, the data collected remains on screen from time of start and begins to slow the web display down as time (and collected data) increases.

It would be nice to have an option for live telemetry allowing the time scale to slide along a specified range of time, reducing the amount of data being kept.

janpaul123 commented 4 years ago

That's a great idea! Which panels in particular do you have this issue with?

defied commented 4 years ago

It's most easily recognized with the plotters, as they maintain the full history. I haven't tried the others, including raw data.

janpaul123 commented 4 years ago

Cool, yeah, makes sense. Most panels keep a fairly limited set of data, but the Plot panel currently always keeps an indefinite set. I believe that the rosout panel also keeps a large amount of data, but not unlimited. The 3d panel keeps an indefinite set if you just keep adding markers and never delete them, but that's in your control to fix.

So perhaps if we just add a maximum number of datapoints to the Plot panel, that might be enough?

defied commented 4 years ago

And possibly make it switchable? It's nice in small rosbags to see the whole trail of data, but when you get larger bags, it would bog down just like live data.

defied commented 4 years ago

Although, I guess if you let us set max datapoints, we could do that ourselves.

orshefi commented 4 years ago

Is there any progress with a solution for this issue? limit X axis entries?

troygibb commented 4 years ago

Check out the plot panel settings:

Screen Shot 2020-07-28 at 8 56 02 AM

There's an X range field for at least limiting the # of x axis entries from a visual standpoint.

As far as performance is concerned, we still don't have a way of limiting the number of points in the Plot panel. We've been shipping a set of performance improvements lately though, I'd try the latest release of Webviz if you haven't already! Let us know if you're still running into issues.