Rerun viewer becomes slow when there are several hundreds of entities
We currently don't have a good example of this. The best we got is
pixi run py-build-examples && pr -e examples open_photogrammetry_format --no-frames
and
- https://github.com/rerun-io/rerun/pull/5449
Related issues
- https://github.com/rerun-io/rerun/issues/3110
- https://github.com/rerun-io/rerun/issues/8101
- https://github.com/rerun-io/rerun/issues/5799
Here's a very simple example that makes the viewer totally unuable:
import rerun as rr
from rerun.datatypes import RotationAxisAngle
rr.init("rerun_example_many_entities", spawn=True)
def one_strip(number_points: int):
return rr.LineStrips3D(
[[0.3 if i % 2 == 0 else -0.3, i, 0] for i in range(number_points)],
)
def rotate(theta: float):
return rr.Transform3D(
rotation_axis_angle=RotationAxisAngle(axis=[0, 0, 1], degrees=theta),
axis_length=0,
)
def draw_lines(lines_count: int, pts_per_line: int):
theta_delta = 360 / lines_count
for i in range(lines_count):
rr.log(f"line_{i}", rotate(theta_delta * i))
rr.log(f"line_{i}/strip", one_strip(pts_per_line))
draw_lines(5000, 10)
I'm trying to get a feel for what is slow. I tried to patch some things and cache others and this is what I see.
Is this slow for the air traffic example?
https://github.com/user-attachments/assets/7f8ce393-2dff-42e2-962f-3b84cadd70aa
@joelreymont "is this slow" is hard to answer without any context like what you're testing, what you're machine running on etc.. A blurry video recording is definitely not sufficient ;-). Also as far as I can tell from that one you're running in debug mode and while we do care about performance of unoptimized builds that's more of an afterthought and not what we profile against. Today we generally think that airtraffic is an example that is too slow on both frame time/rendering as well as ingestion with exact numbers varying a lot on what's on screen of course. If you want to explore what takes time check the profiler in the menu
Took a stab with PR #11743. See related PRs #11741 and #11720.
This branch combines the three PRs above.