Gazebo | Ignition | Community
Ask Your Question

1.3.0 - Performance of SDF File Structure - Redundancy in Reloading Description Files For Every SDF Read?

asked 2012-12-12 10:34:11 -0600

eacousineau gravatar image

I recently checked out the source code of Gazebo 1.3.0 (02a2ec16375a+ (gazebo_1.3) gazebo_1.3.0) and was looking into how the XML and SDF system works. I noticed that for each SDF file is loaded (from gazebo/, Server::LoadFile(), then from gazebo/sdf/interface/, readXml()), it makes multiple calls to sdf::init(). When debugging, it would load the same SDF description files (in gazebo/sdf/1.3) several times.

This seems like it might be redundant and inefficient. Are there plans to cache these loaded XML documents, or are there reasons why they are reloaded every time?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-12 11:33:21 -0600

nkoenig gravatar image

The current plan is to generate C++ class from the SDF description files at compile time. This will bypass touching the filesystem, and also bypass a lot of string based searching.

Look for this in Gazebo 1.4

edit flag offensive delete link more


Ah, makes sense. Thank you.

eacousineau gravatar imageeacousineau ( 2012-12-12 11:35:40 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2012-12-12 10:34:11 -0600

Seen: 318 times

Last updated: Dec 12 '12