-
Notifications
You must be signed in to change notification settings - Fork 486
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
Speed up gazebo test compilation #955
Comments
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). Currently testing the following:
|
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). fe5678c in branch issue_955 It appears to speed up compilation by 20-25% and reduce build folder size by 200 MB for RelWithDebInfo EDIT: these tests were done on osx without ccache |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). I did some testing with ccache on quantal, and the speed gain is much lower (about 9% faster), though I would still expect a more significant speed-up without ccache. The folder size was still reduced by about 200 MB. |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). I did some further refactoring of ServerFixture, moving the code out of the header file and into ServerFixture.cc. This gives even greater speed-ups, leading to a total speed-up of 30% and a 500 MB reduction in build folder size. Timing info on quantal with ccache enabled: Reference build, gazebo_2.1 branch,
9% speed-up with issue_955 branch
30% speed-up with issue_955_refactor branch
|
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). The diff for issue_955_refactor is pretty nasty, maybe rollback some of the #include visibility stinginess for another time. |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). part 1 in pull request #846 |
Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero). Impresive! |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). Unnecessary linking was reduced in pull request #2130, which allows many unit tests to be compiled more quickly, for example:
This no longer requires compiling server_fixture, so it goes much faster. |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). I'm going to mark this as resolved. There were some improvements that reduced unnecessary includes, but I'll leave that for another day and another issue. |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
|
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
|
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
|
Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
Currently several source files are recompiled for every test (Server.cc, Master.cc, gazebo.cc, and ServerFixture.cc). We could probably make a single static library from these files to speed up compilation and reduce the size of the build folder (the object files corresponding to these 4 source files take up about 350 MB in my build folder).
See the GZ_BUILD_TESTS_EXTRA_EXE_SRCS variable in test/integration/CMakeLists.txt (and a few other places) and the gz_build_tests macro in cmake/GazeboTestUtils.cmake
The text was updated successfully, but these errors were encountered: