-
Notifications
You must be signed in to change notification settings - Fork 97
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
Don't reparse parent elements when cloning. #1484
Open
arjo129
wants to merge
8
commits into
sdf15
Choose a base branch
from
arjo/fix/clone_parent_only
base: sdf15
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
construction I'm just checking if adding a cache makes any sense. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129
changed the title
Arjo/fix/clone parent only
Don't reparse parent elements when cloning.
Oct 1, 2024
Signed-off-by: Arjo Chakravarty <[email protected]>
…osim/sdformat into arjo/fix/clone_parent_only
I think macOS build failures are due to osrf/homebrew-simulation#2834 |
I ran the sdf15Ran the test 10 times:
$ time for i in $(seq 10); do bin/PERFORMANCE_parser_urdf 2> /dev/null ; done
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1103 ms)
[----------] 1 test from URDFParser (1103 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1103 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1123 ms)
[----------] 1 test from URDFParser (1123 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1123 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1107 ms)
[----------] 1 test from URDFParser (1107 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1108 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1149 ms)
[----------] 1 test from URDFParser (1149 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1149 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1117 ms)
[----------] 1 test from URDFParser (1117 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1117 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1100 ms)
[----------] 1 test from URDFParser (1100 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1100 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1109 ms)
[----------] 1 test from URDFParser (1109 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1109 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1112 ms)
[----------] 1 test from URDFParser (1112 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1112 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1116 ms)
[----------] 1 test from URDFParser (1116 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1116 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (1118 ms)
[----------] 1 test from URDFParser (1118 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1118 ms total)
[ PASSED ] 1 test.
real 0m11.335s
user 0m8.720s
sys 0m2.549s this branchRan the test 10 times:
$ time for i in $(seq 10); do bin/PERFORMANCE_parser_urdf 2> /dev/null ; done
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (906 ms)
[----------] 1 test from URDFParser (906 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (906 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (894 ms)
[----------] 1 test from URDFParser (894 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (894 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (920 ms)
[----------] 1 test from URDFParser (920 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (920 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (892 ms)
[----------] 1 test from URDFParser (892 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (892 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (923 ms)
[----------] 1 test from URDFParser (923 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (923 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (921 ms)
[----------] 1 test from URDFParser (921 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (921 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (908 ms)
[----------] 1 test from URDFParser (908 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (908 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (945 ms)
[----------] 1 test from URDFParser (945 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (945 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (903 ms)
[----------] 1 test from URDFParser (903 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (903 ms total)
[ PASSED ] 1 test.
Running main() from /Users/scpeters/ws/ionic/src/sdformat/test/gtest_vendor/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from URDFParser
[ RUN ] URDFParser.AtlasURDF_5runs_performance
[ OK ] URDFParser.AtlasURDF_5runs_performance (890 ms)
[----------] 1 test from URDFParser (890 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (890 ms total)
[ PASSED ] 1 test.
real 0m9.280s
user 0m6.680s
sys 0m2.490s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Fixes #
Summary
Improves performance on
sdf::Element::Clone
by not requiring the parent elements to be reparsed. This was originally part of #1479. But it makes sense to seperate out the work.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.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸