-
Notifications
You must be signed in to change notification settings - Fork 527
Open
Labels
project-many-entities-perf📉 performanceOptimization, memory use, etcOptimization, memory use, etc🦟 regressionA thing that used to work in an earlier releaseA thing that used to work in an earlier release🪳 bugSomething isn't workingSomething isn't working
Description
Describe the bug
The latency in the Viewer is rapidly growing when dozens of scalar values are logged. The performance has degraded between 0.17.0 and 0.19.0 (or maybe even 0.18.1)
To Reproduce
Steps to reproduce the behavior:
pip install rerun-sdk==0.17.0
python rerun_latency_test.py
(see code below)- Check latency in performance metrics in Viewer
- Repeat steps (1) - (3) for version 0.19.0 and see how quickly the latency goes up and above a few seconds.
Expected behavior
The latency stays within 10-15ms range as it was in earlier versions.
Test script rerun_latency_test.py
probably, numbers can be different depending on the machine, but in my case the problem is visible when I log 10x5x3=150 scalar values.
import rerun as rr
import time
import random
import threading
import itertools
def log_scalar_values():
rr.init(f"TestLatency", spawn=True, recording_id="default")
while not stop_event.is_set():
for i, j, k in itertools.product(range(0, 10), range(0, 5), range(0, 3)):
scalar_value = random.uniform(0, 1) # Generate a random scalar value
rr.log(f"AAA/{i}/{j}/{k}/value", rr.Scalar(scalar_value))
print(f"Log {scalar_value}")
time.sleep(0.001) # Sleep for 10ms to achieve approximately 100Hz
stop_event = threading.Event()
logging_thread = threading.Thread(target=log_scalar_values)
logging_thread.start()
input("Press Enter to stop logging...\n")
stop_event.set()
logging_thread.join()
print("Logging stopped.")
Desktop (please complete the following information):
- OS: Windows 11
Rerun version
Detected in 0.19.0 but likely appeared in 0.18.0 or 0.18.1
Metadata
Metadata
Assignees
Labels
project-many-entities-perf📉 performanceOptimization, memory use, etcOptimization, memory use, etc🦟 regressionA thing that used to work in an earlier releaseA thing that used to work in an earlier release🪳 bugSomething isn't workingSomething isn't working