Open JafarAbdi opened 4 years ago
Thank you for this experiment @JafarAbdi ! It's quite cool to see the breakup of the never-ending build time.
I did not even attempt to reproduce these numbers yet, but there are a number of interesting insights in there. I am aware that all numbers here should be taken with a grain of salt, but it is still quite obvious that CI times (and also local rebuilds) tend to take quite long these days...
16403 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_joints_widget.cpp.o
@rhaschke Any idea why your new frame takes that long to parse? I mean, sure, qt objects take forever to parse, I'm just surprised to see this one at the top.
13727 ms: moveit_ros_planning_interface/move_group_interface/CMakeFiles/moveit_move_group_interface.dir/src/move_group_interface.cpp.o
I have a hard time understanding why this might take so damn long... This is mostly a bunch of simple ROS interfaces... Looking at ~30 lines of includes to major headers could explain quite a bit though...
105532 ms: Eigen::Transform<double, 3, 1, 0>::rotation (220 times, avg 479 ms) 104054 ms: Eigen::Transform<double, 3, 1, 0>::computeRotationScaling<Eigen::Mat... (220 times, avg 472 ms) 58688 ms: Eigen::JacobiSVD<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 2>::JacobiSVD (220 times, avg 266 ms) 58519 ms: Eigen::JacobiSVD<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 2>::compute (220 times, avg 265 ms)
These should disappear after #1964.
409502 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/robot_model.h (included 217 times, avg 1887 ms)
sounds like a bunch of forward declarations could actually reduce our build-time by quite a lot...
E.g., srdf::Model
is only used via references and in shared_ptr
objects.
@JafarAbdi thanks for preparing this! I also think that there are some really interesting and unexpected results in this log.
sounds like a bunch of forward declarations could actually reduce our build-time by quite a lot... E.g., srdf::Model is only used via references and in shared_ptr objects.
@v4hn That plus removing all unused includes from headers sounds like a great issue for WMD. I'm also wondering if we could do something to improve compile time for all visualization plugins.
I re-analyzed the compile-time again today
**** Time summary:
Compilation (312 times):
Parsing (frontend): 2157.6 s
Codegen & opts (backend): 675.9 s
**** Files that took longest to parse (compiler frontend):
18831 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame.cpp.o
18671 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_objects.cpp.o
18489 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_context.cpp.o
18252 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_scenes.cpp.o
18121 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_joints_widget.cpp.o
18098 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_planning.cpp.o
16358 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_states.cpp.o
16051 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_display.cpp.o
15608 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_manipulation.cpp.o
15490 ms: moveit_planners_ompl/ompl_interface/CMakeFiles/moveit_ompl_interface.dir/src/planning_context_manager.cpp.o
**** Files that took longest to codegen (compiler backend):
14529 ms: moveit_ros_planning_interface/move_group_interface/CMakeFiles/moveit_move_group_interface.dir/src/move_group_interface.cpp.o
13926 ms: moveit_ros_benchmarks/CMakeFiles/moveit_ros_benchmarks.dir/src/BenchmarkExecutor.cpp.o
13648 ms: moveit_ros_warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/src/planning_scene_storage.cpp.o
13144 ms: rviz_visual_tools/CMakeFiles/rviz_visual_tools.dir/src/rviz_visual_tools.cpp.o
12318 ms: moveit_planners_ompl/ompl_interface/CMakeFiles/moveit_ompl_interface.dir/src/planning_context_manager.cpp.o
12314 ms: moveit_kinematics/test/CMakeFiles/test_kinematics_plugin.dir/test_kinematics_plugin.cpp.o
11617 ms: moveit_core/kinematics_metrics/CMakeFiles/moveit_kinematics_metrics.dir/src/kinematics_metrics.cpp.o
11194 ms: moveit_servo/CMakeFiles/moveit_servo_cpp_api.dir/src/servo_calcs.cpp.o
11134 ms: moveit_visual_tools/CMakeFiles/moveit_visual_tools.dir/src/moveit_visual_tools.cpp.o
10442 ms: moveit_ros_planning/planning_pipeline/CMakeFiles/moveit_planning_pipeline.dir/src/planning_pipeline.cpp.o
**** Templates that took longest to instantiate:
119219 ms: Eigen::Transform<double, 3, 1, 0>::computeRotationScaling<Eigen::Mat... (225 times, avg 529 ms)
67744 ms: Eigen::JacobiSVD<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 2>::JacobiSVD (225 times, avg 301 ms)
67526 ms: Eigen::JacobiSVD<Eigen::Matrix<double, 3, 3, 0, 3, 3>, 2>::compute (225 times, avg 300 ms)
55128 ms: Eigen::Transform<double, 3, 1, 0>::operator* (208 times, avg 265 ms)
54697 ms: Eigen::internal::transform_transform_product_impl<Eigen::Transform<d... (207 times, avg 264 ms)
21674 ms: Eigen::MatrixBase<Eigen::Product<Eigen::Matrix<double, 3, 3, 0, 3, 3... (225 times, avg 96 ms)
21256 ms: Eigen::Matrix<double, 3, 3, 0, 3, 3>::Matrix<Eigen::Product<Eigen::M... (225 times, avg 94 ms)
21218 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::Plain... (225 times, avg 94 ms)
21047 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_set_... (225 times, avg 93 ms)
21013 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3... (225 times, avg 93 ms)
20834 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Ei... (225 times, avg 92 ms)
20746 ms: Eigen::internal::generic_product_impl<Eigen::Matrix<double, 3, 3, 0,... (225 times, avg 92 ms)
20248 ms: Eigen::Matrix<double, 3, 1, 0, 3, 1>::operator=<Eigen::Product<Eigen... (201 times, avg 100 ms)
20228 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::_set<... (201 times, avg 100 ms)
20187 ms: Eigen::internal::call_assignment<Eigen::Matrix<double, 3, 1, 0, 3, 1... (201 times, avg 100 ms)
20106 ms: Eigen::internal::call_assignment<Eigen::Matrix<double, 3, 1, 0, 3, 1... (201 times, avg 100 ms)
20092 ms: Eigen::Matrix<double, 3, 1, 0, 3, 1>::Matrix<Eigen::Product<Eigen::B... (203 times, avg 98 ms)
19301 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::_init... (202 times, avg 95 ms)
19282 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::_set_... (202 times, avg 95 ms)
19250 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 1... (202 times, avg 95 ms)
19089 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Ei... (202 times, avg 94 ms)
18980 ms: Eigen::internal::generic_product_impl<Eigen::Block<const Eigen::Matr... (202 times, avg 93 ms)
17883 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3... (225 times, avg 79 ms)
17764 ms: Eigen::DenseBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::isApprox<Ei... (222 times, avg 80 ms)
17725 ms: Eigen::internal::isApprox_selector<Eigen::Matrix<double, 3, 3, 0, 3,... (222 times, avg 79 ms)
17717 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Ei... (225 times, avg 78 ms)
17697 ms: Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, 3,... (225 times, avg 78 ms)
16286 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 1... (202 times, avg 80 ms)
16147 ms: Eigen::Block<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 1, true>::oper... (208 times, avg 77 ms)
16130 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Ei... (202 times, avg 79 ms)
**** Template sets that took longest to instantiate:
179410 ms: Eigen::MatrixBase<$> (19748 times, avg 9 ms)
147473 ms: Eigen::internal::call_assignment_no_alias<$> (7038 times, avg 20 ms)
143475 ms: Eigen::internal::Assignment<$>::run (7035 times, avg 20 ms)
119292 ms: Eigen::internal::call_dense_assignment_loop<$> (7102 times, avg 16 ms)
119219 ms: Eigen::Transform<$>::computeRotationScaling<$> (225 times, avg 529 ms)
103762 ms: std::__and_<$> (58665 times, avg 1 ms)
94423 ms: Eigen::internal::generic_product_impl<$>::evalTo<$> (1421 times, avg 66 ms)
94278 ms: Eigen::internal::call_assignment<$> (4560 times, avg 20 ms)
91778 ms: Eigen::Matrix<$>::Matrix<$> (2543 times, avg 36 ms)
91233 ms: Eigen::PlainObjectBase<$>::_set_noalias<$> (2952 times, avg 30 ms)
79407 ms: Eigen::DenseBase<$> (20574 times, avg 3 ms)
78293 ms: Eigen::JacobiSVD<$>::compute (231 times, avg 338 ms)
75520 ms: Eigen::internal::dense_assignment_loop<$>::run (7488 times, avg 10 ms)
73833 ms: Eigen::JacobiSVD<$>::JacobiSVD (231 times, avg 319 ms)
69841 ms: std::is_constructible<$> (43334 times, avg 1 ms)
68207 ms: std::__is_constructible_impl<$> (42736 times, avg 1 ms)
67287 ms: std::__is_direct_constructible<$> (42302 times, avg 1 ms)
66233 ms: std::__is_direct_constructible_new<$> (41838 times, avg 1 ms)
59909 ms: std::__is_direct_constructible_new_safe<$> (38605 times, avg 1 ms)
59645 ms: Eigen::Block<$> (4794 times, avg 12 ms)
58550 ms: Eigen::BlockImpl<$> (4794 times, avg 12 ms)
57730 ms: Eigen::internal::BlockImpl_dense<$> (4794 times, avg 12 ms)
57315 ms: Eigen::internal::generic_dense_assignment_kernel<$>::assignCoeff (1582 times, avg 36 ms)
56856 ms: Eigen::internal::product_evaluator<$>::coeff (1162 times, avg 48 ms)
56592 ms: Eigen::internal::generic_dense_assignment_kernel<$>::assignCoeffByOu... (1552 times, avg 36 ms)
55838 ms: Eigen::internal::transform_transform_product_impl<$>::run (239 times, avg 233 ms)
55128 ms: Eigen::Transform<double, 3, 1, 0>::operator* (208 times, avg 265 ms)
50284 ms: Eigen::MapBase<$> (5168 times, avg 9 ms)
48335 ms: Eigen::PlainObjectBase<$>::_init1<$> (1318 times, avg 36 ms)
42957 ms: std::is_destructible<$> (30368 times, avg 1 ms)
**** Functions that took longest to compile:
1115 ms: testing::internal::ExecDeathTest::AssumeRole() (/usr/src/googletest/googletest/src/gtest-all.cc)
906 ms: constraint_samplers::ConstraintSamplerManager::selectDefaultSampler(... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/constraint_samplers/src/constraint_sampler_manager.cpp)
833 ms: rviz_visual_tools::RvizVisualTools::publishWireframeCuboid(Eigen::Tr... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/rviz_visual_tools/src/rviz_visual_tools.cpp)
761 ms: Ui_MotionPlanningUI::setupUi(QWidget*) (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp)
722 ms: kinematics_plugin_loader::KinematicsPluginLoader::getLoaderFunction(... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/planning/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp)
607 ms: KinematicsTest_unitIK_Test::TestBody() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/test/test_kinematics_plugin.cpp)
606 ms: Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::compu... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/chainiksolver_vel_mimic_svd.cpp)
566 ms: main (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/warehouse/warehouse/src/broadcast.cpp)
549 ms: moveit_setup_assistant::ConfigurationFilesWidget::loadGenFiles() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/widgets/configuration_files_widget.cpp)
543 ms: actionlib::CommStateMachine<control_msgs::FollowJointTrajectoryActio... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_plugins/moveit_ros_control_interface/src/joint_trajectory_controller_plugin.cpp)
510 ms: main (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/warehouse/warehouse/src/save_to_warehouse.cpp)
467 ms: kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK(geometr... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/kdl_kinematics_plugin.cpp)
464 ms: trajectory_processing::IterativeSplineParameterization::computeTimeS... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/trajectory_processing/src/iterative_spline_parameterization.cpp)
454 ms: srv_kinematics_plugin::SrvKinematicsPlugin::searchPositionIK(std::ve... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/srv_kinematics_plugin/src/srv_kinematics_plugin.cpp)
441 ms: SharedData::initialize() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/test/test_kinematics_plugin.cpp)
436 ms: rviz_visual_tools::RvizVisualToolsDemo::testRows(double&) (/home/jafar_abdi/workspaces/ros/ws_moveit/src/rviz_visual_tools/src/rviz_visual_tools_demo.cpp)
434 ms: collision_detection::collisionCallback(fcl::CollisionObject*, fcl::C... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/collision_detection_fcl/src/collision_common.cpp)
416 ms: kdl_kinematics_plugin::KDLKinematicsPlugin::CartToJnt(KDL::ChainIkSo... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/kdl_kinematics_plugin.cpp)
411 ms: moveit_servo::Servo::readParameters() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/moveit_servo/src/servo.cpp)
408 ms: Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::compu... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/kinematics_metrics/src/kinematics_metrics.cpp)
407 ms: robot_interaction::RobotInteraction::processingThread() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/robot_interaction/src/robot_interaction.cpp)
402 ms: chomp::ChompPlanner::solve(std::shared_ptr<planning_scene::PlanningS... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_planners/chomp/chomp_motion_planner/src/chomp_planner.cpp)
389 ms: planning_pipeline::PlanningPipeline::configure() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/planning/planning_pipeline/src/planning_pipeline.cpp)
389 ms: moveit_ros_benchmarks::BenchmarkExecutor::collectMetrics(std::map<st... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/benchmarks/src/BenchmarkExecutor.cpp)
383 ms: moveit_setup_assistant::MoveItConfigData::getOMPLPlanners() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/tools/moveit_config_data.cpp)
374 ms: lma_kinematics_plugin::LMAKinematicsPlugin::searchPositionIK(geometr... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/lma_kinematics_plugin/src/lma_kinematics_plugin.cpp)
367 ms: actionlib::CommStateMachine<object_recognition_msgs::ObjectRecogniti... (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp)
367 ms: moveit_setup_assistant::PerceptionWidget::loadSensorPluginsComboBox() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/widgets/perception_widget.cpp)
349 ms: chomp::OptimizerAdapter::initialize(ros::NodeHandle const&) (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_planners/chomp/chomp_optimizer_adapter/src/chomp_optimizer_adapter.cpp)
342 ms: ompl_interface::OMPLInterface::loadPlannerConfigurations() (/home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/src/ompl_interface.cpp)
**** Function sets that took longest to compile / optimize:
9866 ms: std::vector<$>::_M_default_append(unsigned long) (650 times, avg 15 ms)
4398 ms: boost::exception_ptr boost::exception_detail::get_static_exception_o... (248 times, avg 17 ms)
3601 ms: Eigen::internal::general_matrix_vector_product<$>::run(long, long, E... (46 times, avg 78 ms)
3457 ms: Eigen::internal::dense_assignment_loop<$>::run(Eigen::internal::gene... (851 times, avg 4 ms)
3259 ms: pluginlib::ClassLoader<$>::processSingleXMLPluginFile(std::__cxx11::... (28 times, avg 116 ms)
3204 ms: std::shared_ptr<$> ompl_interface::MultiQueryPlannerAllocator::alloc... (50 times, avg 64 ms)
2711 ms: std::_Rb_tree<$>::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_... (205 times, avg 13 ms)
2549 ms: actionlib::CommStateMachine<$>::updateStatus(actionlib::ClientGoalHa... (18 times, avg 141 ms)
2443 ms: boost::exception_detail::clone_impl<$>::~clone_impl() (598 times, avg 4 ms)
2398 ms: Eigen::JacobiSVD<$>::compute(Eigen::Matrix<$> const&, unsigned int) (25 times, avg 95 ms)
2387 ms: virtual thunk to boost::exception_detail::clone_impl<$>::~clone_impl() (599 times, avg 3 ms)
2362 ms: void ros::serialization::VectorSerializer<$>::read<$>(ros::serializa... (513 times, avg 4 ms)
2182 ms: non-virtual thunk to boost::exception_detail::clone_impl<$>::~clone_... (598 times, avg 3 ms)
2066 ms: boost::exception_detail::clone_impl<$>::clone_impl(boost::exception_... (529 times, avg 3 ms)
2055 ms: std::_Rb_tree<$>::_M_get_insert_unique_pos(std::__cxx11::basic_strin... (236 times, avg 8 ms)
1919 ms: std::vector<$>::~vector() (1423 times, avg 1 ms)
1782 ms: pluginlib::ClassLoader<$>::getAllLibraryPathsToTry(std::__cxx11::bas... (25 times, avg 71 ms)
1722 ms: std::_Rb_tree_iterator<$> std::_Rb_tree<$>::_M_emplace_hint_unique<$... (249 times, avg 6 ms)
1676 ms: pluginlib::ClassLoader<$>::getClassLibraryPath(std::__cxx11::basic_s... (28 times, avg 59 ms)
1612 ms: std::_Rb_tree<$>::_M_erase(std::_Rb_tree_node<$>*) (480 times, avg 3 ms)
1577 ms: moveit_msgs::CollisionObject_<$>::CollisionObject_(moveit_msgs::Coll... (24 times, avg 65 ms)
1480 ms: std::vector<$>::vector(std::vector<$> const&) (759 times, avg 1 ms)
1461 ms: virtual thunk to boost::exception_detail::clone_impl<$>::clone() const (518 times, avg 2 ms)
1452 ms: __gnu_cxx::__normal_iterator<$> std::__find_if<$>(__gnu_cxx::__norma... (29 times, avg 50 ms)
1379 ms: Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::... (16 times, avg 86 ms)
1320 ms: void ros::serialization::Serializer<$>::allInOne<$>(ros::serializati... (25 times, avg 52 ms)
1316 ms: void std::vector<$>::_M_realloc_insert<$>(__gnu_cxx::__normal_iterat... (62 times, avg 21 ms)
1310 ms: Eigen::internal::product_triangular_matrix_matrix<$>::run(long, long... (48 times, avg 27 ms)
1305 ms: non-virtual thunk to boost::exception_detail::error_info_injector<$>... (347 times, avg 3 ms)
1299 ms: boost::exception_detail::error_info_injector<$>::~error_info_injecto... (349 times, avg 3 ms)
*** Expensive headers:
493741 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/robot_model.h (included 209 times, avg 2362 ms), included via:
state_validity_checker.cpp.o state_validity_checker.h threadsafe_state_storage.h robot_state.h (5007 ms)
threadsafe_state_storage.cpp.o threadsafe_state_storage.h robot_state.h (4871 ms)
motion_planning_frame_joints_widget.cpp.o motion_planning_frame_joints_widget.h robot_state.h (4628 ms)
robot_state_benchmark.cpp.o (4613 ms)
motion_planning_frame_planning.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h (4565 ms)
imarker_robot_state.cpp.o conversions.h robot_state.h (4537 ms)
...
416380 ms: /opt/ros/melodic/include/ros/ros.h (included 248 times, avg 1678 ms), included via:
trajectory_constraints_storage.cpp.o trajectory_constraints_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h (3522 ms)
motion_planning_frame_context.cpp.o planning_scene_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h (3515 ms)
warehouse_connector.cpp.o (3300 ms)
import_from_text.cpp.o planning_scene_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h (3257 ms)
save_to_warehouse.cpp.o planning_scene_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h (3228 ms)
state_storage.cpp.o state_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h (3208 ms)
...
257628 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_ros/planning/planning_scene_monitor/include/moveit/planning_scene_monitor/planning_scene_monitor.h (included 67 times, avg 3845 ms), included via:
clear_octomap_service_capability.cpp.o clear_octomap_service_capability.h move_group_capability.h (8563 ms)
move_action_capability.cpp.o move_action_capability.h move_group_capability.h (8366 ms)
cartesian_path_service_capability.cpp.o cartesian_path_service_capability.h move_group_capability.h (8124 ms)
state_validation_service_capability.cpp.o state_validation_service_capability.h move_group_capability.h (8069 ms)
plan_service_capability.cpp.o plan_service_capability.h move_group_capability.h (7962 ms)
move_group.cpp.o (7946 ms)
...
242603 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_state/include/moveit/robot_state/robot_state.h (included 197 times, avg 1231 ms), included via:
state_validity_checker.cpp.o state_validity_checker.h threadsafe_state_storage.h (5199 ms)
threadsafe_state_storage.cpp.o threadsafe_state_storage.h (5057 ms)
motion_planning_frame_joints_widget.cpp.o motion_planning_frame_joints_widget.h (4800 ms)
motion_planning_frame_planning.cpp.o motion_planning_frame.h move_group_interface.h (4764 ms)
locked_robot_state.cpp.o locked_robot_state.h (4740 ms)
imarker_robot_state.cpp.o conversions.h (4714 ms)
...
233550 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model_group.h (included 210 times, avg 1112 ms), included via:
motion_planning_frame_scenes.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h robot_model.h (2084 ms)
motion_planning_frame_objects.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h robot_model.h (2008 ms)
motion_planning_frame_context.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h robot_model.h (1866 ms)
trajectory_display.cpp.o trajectory_display.h trajectory_visualization.h robot_state_visualization.h robot_state.h robot_model.h (1854 ms)
initialize_demo_db.cpp.o planning_scene_monitor.h planning_scene.h robot_model.h (1839 ms)
motion_planning_frame.cpp.o common_objects.h current_state_monitor.h robot_state.h robot_model.h (1761 ms)
...
223860 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/planning_scene/include/moveit/planning_scene/planning_scene.h (included 141 times, avg 1587 ms), included via:
planning_scene_render.cpp.o planning_scene_render.h (5174 ms)
constraint_sampler_manager_loader.cpp.o constraint_sampler_manager_loader.h constraint_sampler_manager.h constraint_sampler_allocator.h constraint_sampler.h (4896 ms)
perception_widget.cpp.o perception_widget.h moveit_config_data.h (4623 ms)
constraint_sampler.cpp.o constraint_sampler.h (4543 ms)
constraint_sampler_tools.cpp.o constraint_sampler_tools.h constraint_sampler.h (4503 ms)
passive_joints_widget.cpp.o passive_joints_widget.h moveit_config_data.h (4497 ms)
...
173293 ms: /home/jafar_abdi/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model.h (included 217 times, avg 798 ms), included via:
fixed_joint_model.cpp.o fixed_joint_model.h (2363 ms)
planar_joint_model.cpp.o planar_joint_model.h (2302 ms)
floating_joint_model.cpp.o floating_joint_model.h (2259 ms)
prismatic_joint_model.cpp.o prismatic_joint_model.h (2257 ms)
revolute_joint_model.cpp.o revolute_joint_model.h (2250 ms)
joint_model.cpp.o (2174 ms)
...
168281 ms: /usr/include/eigen3/Eigen/Geometry (included 250 times, avg 673 ms), included via:
aabb.cpp.o aabb.h (1455 ms)
motion_planning_frame_scenes.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h robot_model.h joint_model_group.h joint_model.h (1408 ms)
motion_planning_frame_objects.cpp.o motion_planning_frame.h move_group_interface.h robot_state.h robot_model.h joint_model_group.h joint_model.h (1406 ms)
time_optimal_trajectory_generation.cpp.o (1334 ms)
trajectory_display.cpp.o trajectory_display.h trajectory_visualization.h robot_state_visualization.h robot_state.h robot_model.h joint_model_group.h joint_model.h (1267 ms)
aabb.cpp.o aabb.h (1266 ms)
...
134597 ms: /usr/include/boost/function.hpp (included 2715 times, avg 49 ms), included via:
kinematics_plugin_loader.cpp.o kinematics_plugin_loader.h (1613 ms)
model_based_planning_context.cpp.o split.hpp iter_find.hpp find_iterator.hpp find_iterator.hpp (923 ms)
world_diff.cpp.o world_diff.h world.h (884 ms)
collision_env_allvalid.cpp.o collision_env_allvalid.h collision_env.h collision_matrix.h collision_common.h (864 ms)
collision_common.cpp.o collision_common.h world.h (832 ms)
collision_env.cpp.o collision_env.h collision_matrix.h collision_common.h (832 ms)
...
125568 ms: /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp (included 3045 times, avg 41 ms), included via:
moveit_visual_tools.cpp.o moveit_visual_tools.h rviz_visual_tools.h ros.h common.h forwards.h function.hpp (466 ms)
model_based_state_space.cpp.o model_based_state_space.h robot_model.h model.h ros.h common.h forwards.h function.hpp (439 ms)
robot_interaction.cpp.o robot_interaction.h menu_handler.h interactive_marker_server.h ros.h common.h forwards.h function.hpp (433 ms)
save_to_warehouse.cpp.o planning_scene_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h ros.h common.h forwards.h function.hpp (422 ms)
fix_start_state_collision.cpp.o planning_request_adapter.h planning_interface.h planning_response.h robot_trajectory.h robot_state.h robot_model.h model.h ros.h common.h forwards.h function.hpp (416 ms)
joint_model_state_space.cpp.o joint_model_state_space.h model_based_state_space.h robot_model.h model.h ros.h common.h forwards.h function.hpp (409 ms)
...
A few weeks ago I did profile MoveIt's compile-time, posting it here for discussion and if anyone is interested, hopefully, we come out with ideas to decrease the compile-time
Tools used
Clang-9 installation and running catkin with it,
sudo apt install clang-9
catkin build --cmake-args -DCMAKE_CXX_FLAGS="-ftime-trace" -DCMAKE_CXX_COMPILER="/usr/bin/clang++-9"
it will generate a JSON file for each target which can be viewed in chrome://tracing/ -- for aggregating the targets' compile-time for a package Python code to combine time trace files
Running ClangBuildAnalyzer for MoveIt to auto-analyzing the compile-time
System info: