Closed Rain1618 closed 2 weeks ago
Tancrede's results:
I ran the profiler on the SquarePool Scene. Here are the main culprits (tested in editor mode, on my local machine directly—no containers):
On average
Thrusters.Update()
ROSClock.Update()
CameraPublisher.SendImage()
CameraDepthPublisher.SendImage()
Spikes (consistently every ~13 frames)
SendImage()
The two ROS camera publishers are incurring significant latency due to:
Suggestion: Caching some data may help reduce the load on the garbage collector?
Physics updates contribute a smaller, yet still notable CPU load (5-10%). This mainly stems from:
Suggestion: optimize any math/physics computations for efficiency?
UI updates also add to CPU usage slightly, though not heavily.
Tancrede's results:
I ran the profiler on the SquarePool Scene. Here are the main culprits (tested in editor mode, on my local machine directly—no containers):
Current High-Latency Events (by CPU Usage, Descending):
On average
Thrusters.Update()
&ROSClock.Update()
CameraPublisher.SendImage()
&CameraDepthPublisher.SendImage()
Spikes (consistently every ~13 frames)
SendImage()
: specifically, garbage collection (GC) is causing the spikes.Observations
The two ROS camera publishers are incurring significant latency due to:
SendImage()
methodsSendImage()
callsSuggestion: Caching some data may help reduce the load on the garbage collector?
Physics updates contribute a smaller, yet still notable CPU load (5-10%). This mainly stems from:
Suggestion: optimize any math/physics computations for efficiency?
UI updates also add to CPU usage slightly, though not heavily.