Skip to content

Optimize include headers - #128

Open
ahcorde wants to merge 2 commits into
rollingfrom
ahcorde/rolling/optimize_include_headers
Open

Optimize include headers#128
ahcorde wants to merge 2 commits into
rollingfrom
ahcorde/rolling/optimize_include_headers

Conversation

@ahcorde

@ahcorde ahcorde commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Optimize include headers

Reduce in my computer around 2.5s. From 22.6 s to 21.00 s

Claude Opus 4.7

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde
ahcorde requested a review from asymingt July 30, 2026 13:35
@ahcorde ahcorde self-assigned this Jul 30, 2026
@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>

@asymingt asymingt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you ask your AI agent to stick with the public-facing interface and avoid using the headers in detail, as they may change. IMHO the brittleness added by this is not worth any performance gain.

#include "visualization_msgs/msg/interactive_marker.hpp"
#include "visualization_msgs/msg/interactive_marker_control.hpp"
#include "visualization_msgs/msg/marker.hpp"
#include "geometry_msgs/msg/detail/quaternion__struct.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what you wanted? I don't think we should be depending on the internal headers in /detail/.


#include "visualization_msgs/msg/interactive_marker_feedback.hpp"
#include "visualization_msgs/msg/menu_entry.hpp"
#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


#include "rmw/types.h"

#include "geometry_msgs/msg/detail/pose__struct.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

#include "rclcpp/subscription_base.hpp"
#include "rclcpp/time.hpp"

#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants