Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile and reduce simulation overhead #366

Open
gizatt opened this issue Feb 8, 2019 · 1 comment
Open

Profile and reduce simulation overhead #366

gizatt opened this issue Feb 8, 2019 · 1 comment
Assignees

Comments

@gizatt
Copy link
Collaborator

gizatt commented Feb 8, 2019

Opening an issue to start to collect some measurements in terms of possible causes of inefficiency in the sim (esp. on our end with ROS interface things).

Here is a callgrind file from a sim run; view with e.g. KCacheGrind.

Some observations so far (preliminary, and not totally confident... this code includes lots of cycles that confuse the profiler...)

  • MBP simulation itself seems to take a majority (but not a huge majority) of the time, but with more cameras, rendering might take the lead.
  • The slowest part of the RosRgbdCameraPublisher is its loop copying the depth image into the ROS message, but it takes about 1/5 the time as the rendering itself. (So there's lots room for improvement, especially as it's a relatively straightforward simple memory copy, but it's not egregious as we worried.)
  • The RViz Scene Graph viz is definitely doing something bad -- the IM ApplyChanges() method is taking something like 5% of all runtime, and seems to be on the same order of magnitude (maybe 2x-4x less?) than the RGBD rendering.

But again these are viewed through the lens of profiling code that gets called from a really complicated cyclic call graph (I think, since the systems framework does many evaluations on-demand by dependency tracking, e.g. so the RGBD camera publisher system actually gets "credit" for the RGBD rendering). I'll poke a bit more at doing this profiling in other ways (via abalation, and via some hooks into the System framework...)

@gizatt gizatt self-assigned this Feb 8, 2019
@peteflorence
Copy link
Collaborator

🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants