Slow rendering causes data ingestion to be even slower #7678
Labels
😤 annoying
Something in the UI / SDK is annoying to use
🚀 performance
Optimization, memory use, etc
project-many-entities-perf
📺 re_viewer
affects re_viewer itself
user-request
This is a pressing issue for one of our users
Problem: Suppose that
In this case, the data will be extremely slow to load — but faster if you switch to a different recording that isn't so slow to draw. The culprit, I would guess, is this logic in
re_viewer
’s message receiving loop:rerun/crates/viewer/re_viewer/src/app.rs
Lines 1192 to 1195 in 06cfa9e
This means that after each 10 ms portion of the data is loaded, the viewer will redraw all the (visible) data loaded so far — which means in my example of 200 ms drawing time, means it's spending 95% of its time redrawing partially-loaded data instead of getting more data loaded, and over the entire process adds up to a total load time that could be as bad as O(N²) (in the worst case where the redraw cost is proportional to the data loaded so far). In the actual scenario that inspired this report, my user experience is like: run application for 2 seconds, exit application, wait 1 minute for the viewer to finish thinking about the data it got.
Possible solutions:
receive_messages()
without doing it insideupdate()
.EntityDb
that allows the data source to be appending while the renderer is reading.(Obviously, it would be better if the data wasn’t taking 200 ms to draw in this scenario. But, no matter how efficient the renderer gets, users will always have reasons to push the limits of what is feasible on the hardware they have, so I think it’s worth doing something here.)
The text was updated successfully, but these errors were encountered: