-
Notifications
You must be signed in to change notification settings - Fork 212
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
Reduce compilation memory #540
Conversation
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
When we aren't doing one huge automoc file, we need these paths to be more correct. This fixes them. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
It ends up generating one huge mocs_compilation.cpp file that can take up to 2.5GB to compile. Instead, generate the individual files; while it slows down compilation a bit, each file is much smaller and no single process takes nearly as much memory. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Bah. Maybe I need to link something into display_test_fixture. Will take a look. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
I think f83a9d8 fixes the problems on Windows and macOS. Still waiting for local confirmation of that; once I have it, I'll fire up CI again. |
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.
Approach looks reasonable to me. With ci fixed up.
All right, the macOS warning is in the nightly as well: https://ci.ros2.org/view/nightly/job/nightly_osx_release/1638/ . I've opened up ament/ament_cmake#255 to track the addition to ament_cmake, and #543 to track the refactoring of display_test_fixture.cpp. With that, I'm going to go ahead and merge this. Thanks for the reviews. |
Please squash when merging... |
I intentionally didn't here, since the changes were a logical progression from one to the next. I thought it would be easier to understand what I did in the individual commits rather than one squashed one. |
From a changelog perspective, it's not any easier to read, because all the same information is there, as the commit messages from the component commits end up in the squashed commit message. The separate commits continue to exist here on this pr, and squashing makes it easier to cherry-pick this set of changes if we wanted to do that. I think squashing is pretty much always better, and at least on this repository I'd like to keep doing that in the future. |
As pointed out in #539 , it can take a lot of memory to compile rviz_default_plugins. This PR aims to reduce the maximum amount of memory necessary to compile by doing two major things:
The rest of the changes are to support the above.
I've done some basic testing of RViz2 locally with these changes, both the tests and RViz2 itself. I believe this will close #539 .