Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks @silvio.traversaro for suggesting the flame graphs, I think I'm now on to what is happening here. It seems that ODEPhysics::CreateLink() calls dSimpleSpaceCreate for every model, but I can find zero code which deletes these spaces when models are removed from the world. Every model created thus results in an extra space. This would cause a quadratic slowdown since collision code is probably roughly O(n^2).

I'll move on to verify this is indeed correct, file a bug report and mark this as the correct answer.

Thanks @silvio.traversaro for suggesting the flame graphs, I think I'm now on to what is happening here. It seems that ODEPhysics::CreateLink() calls dSimpleSpaceCreate for every model, but I can find zero code which deletes these spaces when models are removed from the world. Every model created thus results in an extra space. This would cause a quadratic slowdown since collision code is probably roughly O(n^2).

I'll move on to verify this is indeed correct, file a bug report and mark this as the correct answer.

EDIT: This does indeed appear to be what's going on, created issue https://bitbucket.org/osrf/gazebo/issues/1780/ode-collision-space-not-deleted-when-model. Unfortunately I'm still seeing performance degrade over time (though far less profound), likely caused by another issue. I'll continue to investigate but I'll mark this as the correct answer.