-
Notifications
You must be signed in to change notification settings - Fork 342
Skip Model SDF serialization #3070
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
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
// Its super expensive to create an SDFElement for some reason | ||
// https://github.com/gazebosim/sdformat/issues/1478 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove all the code in here as well since we know we won't be deserializing anything.
I'm curious what completely removing serialization breaks. Do we have any downstream systems that use this model info? |
Currently the |
I have an alternative workaround in #3082. That PR does not break any existing behavior. It improves the load time but just not as much as this PR. |
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
c006f60
to
a53c290
Compare
🦟 Bug fix
Related gazebosim/sdformat#1478
Summary
Skip model sdf serialization. The main problem is actually in the perf of deserialization (
root.LoadSdfString
), see gazebosim/sdformat#1478. This change returns an empty string in theSerialize
function which will cause theDeserialize
function to just skip trying to load the sdf string.Testing with the Jetty demo world, the reduced load time from 55s to 42s and resuming from paused state (ie hit Play button) is now almost instantaneous.
Checklist
codecheck
passed (See contributing)Generated-by: Remove this if GenAI was not used.
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.