-
Notifications
You must be signed in to change notification settings - Fork 269
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
Improve load times by skipping serialization of entities when unecessary. #2596
base: main
Are you sure you want to change the base?
Conversation
I was investigating gazebosim/gazebo_test_cases#1576 , in my investigation it came to my notice that `sdf::Element` takes forever to destroy (We should open a ticket somewhere about this). If we are skipping serialization we might as well not create and destroy an SDF Element. This hack greatly speeds up the load time for gazebo. Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
I remember we added this serializing of |
All that I remembered was that it started motivated to support scaling. I'm not sure if after that any other piece is using it. |
cc: @caguero Should we remove the serialization all together then? The speed up from removing it is quite a bit. Each model instance takes about 0.1s to deserialize (which is not very good). I do think we should eventually address the root cause which I've documented here: gazebosim/sdformat#1478 |
@arjo129 having long load times is not great, but since this has been an issue for a long time and only affects loading large files, I would not consider it a critical bug. I'd rather not make this change while we are in code freeze. |
Sure lets revisit this after the release. That being said, I would say that 3k worlds only loads on the largest computer I have access to (which happens to be a cloud instance). It fails to load on any of my local machines. This fix also makes loading openrmf demo worlds a lot faster. |
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
…//github.com/gazebosim/gz-sim into arjo/fix/a_hack_to_greatly_improve_loadtimes
the Examples test failure is unrelated, and should be fixed by #2649 |
Signed-off-by: Ian Chen <ichen@openrobotics.org>
…eatly_improve_loadtimes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2596 +/- ##
==========================================
- Coverage 68.80% 68.78% -0.02%
==========================================
Files 341 341
Lines 33037 33052 +15
==========================================
+ Hits 22730 22736 +6
- Misses 10307 10316 +9 ☔ View full report in Codecov by Sentry. |
this branch is based on |
🤦 Thanks for spotting that! |
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
🦟 Bug fix
Fixes #
Summary
I was investigating
gazebosim/gazebo_test_cases#1576 , in my investigation it came to my notice that
sdf::Root
takes a long time to be constructed. While I am submitting changes upstream to reduce the impact of the creation ofsdf::Root
, in the event that we don't serialize a model, I'm proposing we just send an empty string accross. This should minimize both network traffic and make load times more manageable.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸