moveit / moveit

:robot: The MoveIt motion planning framework
http://moveit.ros.org
BSD 3-Clause "New" or "Revised" License
1.71k stars 948 forks source link

MoveIt compile-time profiling #2081

Open JafarAbdi opened 4 years ago

JafarAbdi commented 4 years ago

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,

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

**** Time summary:
Compilation (324 times):
  Parsing (frontend):         1843.2 s
  Codegen & opts (backend):    542.5 s

**** Files that took longest to parse (compiler frontend):
 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
 14555 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_objects.cpp.o
 14401 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame.cpp.o
 13812 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_display.cpp.o
 13802 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_planning.cpp.o
 13709 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_states.cpp.o
 13592 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_scenes.cpp.o
 13248 ms: moveit_jog_arm/CMakeFiles/jog_arm_cpp_api.dir/src/jog_calcs.cpp.o
 13178 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_context.cpp.o
 13116 ms: moveit_ros_visualization/motion_planning_rviz_plugin/CMakeFiles/moveit_motion_planning_rviz_plugin_core.dir/src/motion_planning_frame_manipulation.cpp.o

**** Files that took longest to codegen (compiler backend):
 13727 ms: moveit_ros_planning_interface/move_group_interface/CMakeFiles/moveit_move_group_interface.dir/src/move_group_interface.cpp.o
 11268 ms: moveit_ros_warehouse/warehouse/CMakeFiles/moveit_warehouse.dir/src/planning_scene_storage.cpp.o
 10317 ms: moveit_ros_benchmarks/CMakeFiles/moveit_ros_benchmarks.dir/src/BenchmarkExecutor.cpp.o
 10070 ms: moveit_planners_ompl/ompl_interface/CMakeFiles/moveit_ompl_interface.dir/src/planning_context_manager.cpp.o
  9283 ms: moveit_kinematics/test/CMakeFiles/test_kinematics_plugin.dir/test_kinematics_plugin.cpp.o
  9062 ms: moveit_core/kinematics_metrics/CMakeFiles/moveit_kinematics_metrics.dir/src/kinematics_metrics.cpp.o
  8431 ms: moveit_ros_planning/trajectory_execution_manager/CMakeFiles/moveit_trajectory_execution_manager.dir/src/trajectory_execution_manager.cpp.o
  8057 ms: moveit_jog_arm/CMakeFiles/jog_arm_cpp_api.dir/src/jog_calcs.cpp.o
  7997 ms: moveit_jog_arm/CMakeFiles/jog_server.dir/src/jog_calcs.cpp.o
  7814 ms: moveit_ros_planning/planning_pipeline/CMakeFiles/moveit_planning_pipeline.dir/src/planning_pipeline.cpp.o

**** Templates that took longest to instantiate:
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)
 56129 ms: Eigen::Transform<double, 3, 1, 0>::operator* (215 times, avg 261 ms)
 55750 ms: Eigen::internal::transform_transform_product_impl<Eigen::Transform<d... (215 times, avg 259 ms)
 18551 ms: Eigen::Block<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 3, false>::ope... (216 times, avg 85 ms)
 18512 ms: Eigen::BlockImpl<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 3, false, ... (216 times, avg 85 ms)
 18486 ms: Eigen::internal::BlockImpl_dense<Eigen::Matrix<double, 4, 4, 0, 4, 4... (216 times, avg 85 ms)
 18461 ms: Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, 4, 4, 0, 4, 4>,... (216 times, avg 85 ms)
 18424 ms: Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, ... (216 times, avg 85 ms)
 18361 ms: Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, ... (216 times, avg 85 ms)
 18036 ms: Eigen::MatrixBase<Eigen::Product<Eigen::Matrix<double, 3, 3, 0, 3, 3... (220 times, avg 81 ms)
 17677 ms: Eigen::Matrix<double, 3, 3, 0, 3, 3>::Matrix<Eigen::Product<Eigen::M... (220 times, avg 80 ms)
 17644 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::Plain... (220 times, avg 80 ms)
 17500 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_set_... (220 times, avg 79 ms)
 17472 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3... (220 times, avg 79 ms)
 17322 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Ei... (220 times, avg 78 ms)
 17248 ms: Eigen::internal::generic_product_impl<Eigen::Matrix<double, 3, 3, 0,... (220 times, avg 78 ms)
 16843 ms: Eigen::Matrix<double, 3, 3, 0, 3, 3>::Matrix<Eigen::Product<Eigen::B... (216 times, avg 77 ms)
 16517 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_init... (216 times, avg 76 ms)
 16502 ms: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_set_... (216 times, avg 76 ms)
 16473 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3... (216 times, avg 76 ms)
 16336 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Ei... (216 times, avg 75 ms)
 16247 ms: Eigen::internal::generic_product_impl<Eigen::Block<const Eigen::Matr... (216 times, avg 75 ms)
 14838 ms: Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3... (220 times, avg 67 ms)
 14696 ms: Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Ei... (220 times, avg 66 ms)
 14675 ms: Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, 3,... (220 times, avg 66 ms)
 14393 ms: Eigen::Block<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 1, true>::oper... (216 times, avg 66 ms)
 14320 ms: Eigen::BlockImpl<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 3, 1, true, E... (216 times, avg 66 ms)

**** Template sets that took longest to instantiate:
123832 ms: Eigen::MatrixBase<$> (16253 times, avg 7 ms)
123470 ms: Eigen::internal::call_assignment_no_alias<$> (6233 times, avg 19 ms)
120447 ms: Eigen::internal::Assignment<$>::run (6232 times, avg 19 ms)
105532 ms: Eigen::Transform<$>::rotation (220 times, avg 479 ms)
104054 ms: Eigen::Transform<$>::computeRotationScaling<$> (220 times, avg 472 ms)
 98455 ms: Eigen::internal::call_dense_assignment_loop<$> (6311 times, avg 15 ms)
 91135 ms: std::__and_<$> (56206 times, avg 1 ms)
 86366 ms: Eigen::internal::call_assignment<$> (4623 times, avg 18 ms)
 80572 ms: Eigen::internal::generic_product_impl<$>::evalTo<$> (1437 times, avg 56 ms)
 73852 ms: Eigen::Matrix<$>::Matrix<$> (2086 times, avg 35 ms)
 72975 ms: Eigen::PlainObjectBase<$>::_set_noalias<$> (2105 times, avg 34 ms)
 71501 ms: Eigen::JacobiSVD<$>::compute (227 times, avg 314 ms)
 67272 ms: Eigen::JacobiSVD<$>::JacobiSVD (229 times, avg 293 ms)
 62920 ms: Eigen::internal::dense_assignment_loop<$>::run (6659 times, avg 9 ms)
 62240 ms: std::is_constructible<$> (43139 times, avg 1 ms)
 60692 ms: std::__is_constructible_impl<$> (42275 times, avg 1 ms)
 59783 ms: std::__is_direct_constructible<$> (41763 times, avg 1 ms)
 58841 ms: std::__is_direct_constructible_new<$> (41309 times, avg 1 ms)
 56677 ms: Eigen::internal::transform_transform_product_impl<$>::run (246 times, avg 230 ms)
 56129 ms: Eigen::Transform<double, 3, 1, 0>::operator* (215 times, avg 261 ms)
 55310 ms: Eigen::DenseBase<$> (17105 times, avg 3 ms)
 53629 ms: std::__is_direct_constructible_new_safe<$> (38939 times, avg 1 ms)
 48281 ms: Eigen::internal::generic_dense_assignment_kernel<$>::assignCoeff (1244 times, avg 38 ms)
 48144 ms: Eigen::internal::product_evaluator<$>::coeff (1186 times, avg 40 ms)
 47893 ms: Eigen::internal::generic_dense_assignment_kernel<$>::assignCoeffByOu... (1469 times, avg 32 ms)
 44994 ms: Eigen::Block<$> (4423 times, avg 10 ms)
 44148 ms: Eigen::BlockImpl<$> (4423 times, avg 9 ms)
 43541 ms: Eigen::internal::BlockImpl_dense<$> (4423 times, avg 9 ms)
 41529 ms: Eigen::MapBase<$> (5039 times, avg 8 ms)
 38687 ms: Eigen::PlainObjectBase<$>::_init1<$> (893 times, avg 43 ms)

**** Functions that took longest to compile:
   962 ms: testing::internal::ExecDeathTest::AssumeRole() (/usr/src/googletest/googletest/src/gtest-all.cc)
   934 ms: moveit_jog_arm::JogInterfaceBase::readParameters(ros::NodeHandle&) (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_experimental/moveit_jog_arm/src/jog_interface_base.cpp)
   596 ms: Ui_MotionPlanningUI::setupUi(QWidget*) (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp)
   524 ms: constraint_samplers::ConstraintSamplerManager::selectDefaultSampler(... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/constraint_samplers/src/constraint_sampler_manager.cpp)
   503 ms: Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::compu... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_experimental/moveit_jog_arm/src/jog_calcs.cpp)
   454 ms: Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::compu... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/chainiksolver_vel_mimic_svd.cpp)
   453 ms: kinematics_plugin_loader::KinematicsPluginLoader::getLoaderFunction(... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/planning/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp)
   441 ms: moveit_setup_assistant::ConfigurationFilesWidget::loadGenFiles() (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/widgets/configuration_files_widget.cpp)
   419 ms: srv_kinematics_plugin::SrvKinematicsPlugin::searchPositionIK(std::ve... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/srv_kinematics_plugin/src/srv_kinematics_plugin.cpp)
   414 ms: KinematicsTest_unitIK_Test::TestBody() (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/test/test_kinematics_plugin.cpp)
   399 ms: collision_detection::collisionCallback(fcl::CollisionObject*, fcl::C... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/collision_detection_fcl/src/collision_common.cpp)
   381 ms: main (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/warehouse/warehouse/src/broadcast.cpp)
   373 ms: moveit_setup_assistant::MoveItConfigData::getOMPLPlanners() (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/tools/moveit_config_data.cpp)
   370 ms: main (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/warehouse/warehouse/src/save_to_warehouse.cpp)
   367 ms: kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK(geometr... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/kdl_kinematics_plugin.cpp)
   363 ms: moveit_jog_arm::JogCalcs::cartesianJogCalcs(geometry_msgs::TwistStam... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_experimental/moveit_jog_arm/src/jog_calcs.cpp)
   348 ms: lma_kinematics_plugin::LMAKinematicsPlugin::searchPositionIK(geometr... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/lma_kinematics_plugin/src/lma_kinematics_plugin.cpp)
   343 ms: SharedData::initialize() (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/test/test_kinematics_plugin.cpp)
   327 ms: moveit_setup_assistant::PerceptionWidget::loadSensorPluginsComboBox() (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_setup_assistant/src/widgets/perception_widget.cpp)
   320 ms: moveit_jog_arm::JogCalcs::startMainLoop(moveit_jog_arm::JogArmShared... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_experimental/moveit_jog_arm/src/jog_calcs.cpp)
   314 ms: trajectory_processing::IterativeSplineParameterization::computeTimeS... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/trajectory_processing/src/iterative_spline_parameterization.cpp)
   304 ms: moveit_fake_controller_manager::MoveItFakeControllerManager::MoveItF... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_plugins/moveit_fake_controller_manager/src/moveit_fake_controller_manager.cpp)
   301 ms: pick_place::PlacePlan::plan(std::shared_ptr<planning_scene::Planning... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/manipulation/pick_place/src/place.cpp)
   293 ms: kdl_kinematics_plugin::KDLKinematicsPlugin::CartToJnt(KDL::ChainIkSo... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/kdl_kinematics_plugin/src/kdl_kinematics_plugin.cpp)
   291 ms: testing::internal::NoExecDeathTest::AssumeRole() (/usr/src/googletest/googletest/src/gtest-all.cc)
   287 ms: Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::compu... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/kinematics_metrics/src/kinematics_metrics.cpp)
   285 ms: main (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_kinematics/test/benchmark_ik.cpp)
   285 ms: robot_trajectory::RobotTrajectory::getRobotTrajectoryMsg(moveit_msgs... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_trajectory/src/robot_trajectory.cpp)
   284 ms: moveit_ros_benchmarks::BenchmarkExecutor::collectMetrics(std::map<st... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/benchmarks/src/BenchmarkExecutor.cpp)
   282 ms: moveit_simple_controller_manager::MoveItSimpleControllerManager::Mov... (/home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_plugins/moveit_simple_controller_manager/src/moveit_simple_controller_manager.cpp)

**** Function sets that took longest to compile / optimize:
  7923 ms: std::vector<$>::_M_default_append(unsigned long) (653 times, avg 12 ms)
  3558 ms: boost::exception_ptr boost::exception_detail::get_static_exception_o... (260 times, avg 13 ms)
  2942 ms: Eigen::JacobiSVD<$>::compute(Eigen::Matrix<$> const&, unsigned int) (47 times, avg 62 ms)
  2903 ms: Eigen::internal::general_matrix_vector_product<$>::run(long, long, E... (47 times, avg 61 ms)
  2657 ms: std::shared_ptr<$> ompl_interface::MultiQueryPlannerAllocator::alloc... (50 times, avg 53 ms)
  2371 ms: pluginlib::ClassLoader<$>::processSingleXMLPluginFile(std::__cxx11::... (27 times, avg 87 ms)
  2185 ms: Eigen::internal::dense_assignment_loop<$>::run(Eigen::internal::gene... (750 times, avg 2 ms)
  2112 ms: std::_Rb_tree<$>::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_... (209 times, avg 10 ms)
  1983 ms: void ros::serialization::VectorSerializer<$>::read<$>(ros::serializa... (507 times, avg 3 ms)
  1789 ms: actionlib::CommStateMachine<$>::updateStatus(actionlib::ClientGoalHa... (17 times, avg 105 ms)
  1776 ms: boost::exception_detail::clone_impl<$>::~clone_impl() (570 times, avg 3 ms)
  1745 ms: virtual thunk to boost::exception_detail::clone_impl<$>::~clone_impl() (573 times, avg 3 ms)
  1604 ms: non-virtual thunk to boost::exception_detail::clone_impl<$>::~clone_... (568 times, avg 2 ms)
  1584 ms: boost::exception_detail::clone_impl<$>::clone_impl(boost::exception_... (524 times, avg 3 ms)
  1576 ms: std::_Rb_tree<$>::_M_get_insert_unique_pos(std::__cxx11::basic_strin... (234 times, avg 6 ms)
  1421 ms: std::vector<$>::~vector() (1167 times, avg 1 ms)
  1310 ms: std::_Rb_tree_iterator<$> std::_Rb_tree<$>::_M_emplace_hint_unique<$... (255 times, avg 5 ms)
  1271 ms: std::vector<$>::vector(std::vector<$> const&) (773 times, avg 1 ms)
  1225 ms: pluginlib::ClassLoader<$>::getAllLibraryPathsToTry(std::__cxx11::bas... (23 times, avg 53 ms)
  1192 ms: pluginlib::ClassLoader<$>::getClassLibraryPath(std::__cxx11::basic_s... (27 times, avg 44 ms)
  1182 ms: moveit_msgs::CollisionObject_<$>::CollisionObject_(moveit_msgs::Coll... (24 times, avg 49 ms)
  1109 ms: virtual thunk to boost::exception_detail::clone_impl<$>::clone() const (476 times, avg 2 ms)
  1077 ms: std::_Rb_tree<$>::_M_erase(std::_Rb_tree_node<$>*) (417 times, avg 2 ms)
  1042 ms: __gnu_cxx::__normal_iterator<$> std::__find_if<$>(__gnu_cxx::__norma... (29 times, avg 35 ms)
  1038 ms: std::shared_ptr<$> ompl_interface::MultiQueryPlannerAllocator::alloc... (50 times, avg 20 ms)
  1020 ms: void ros::serialization::Serializer<$>::allInOne<$>(ros::serializati... (24 times, avg 42 ms)
  1013 ms: void std::vector<$>::_M_realloc_insert<$>(__gnu_cxx::__normal_iterat... (65 times, avg 15 ms)
   996 ms: Eigen::internal::product_triangular_matrix_matrix<$>::run(long, long... (47 times, avg 21 ms)
   979 ms: void std::vector<$>::_M_range_insert<$>(__gnu_cxx::__normal_iterator... (29 times, avg 33 ms)
   954 ms: std::__cxx11::basic_string<$>* std::__uninitialized_copy<$>::__unini... (109 times, avg 8 ms)

*** Expensive headers:
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), included via:
  state_validity_checker.cpp.o state_validity_checker.h threadsafe_state_storage.h robot_state.h  (4148 ms)
  threadsafe_state_storage.cpp.o threadsafe_state_storage.h robot_state.h  (3759 ms)
  imarker_robot_state.cpp.o conversions.h robot_state.h  (3712 ms)
  constraint_sampler_manager_loader.cpp.o constraint_sampler_manager_loader.h constraint_sampler_manager.h constraint_sampler_allocator.h constraint_sampler.h planning_scene.h  (3663 ms)
  motion_planning_frame_joints_widget.cpp.o motion_planning_frame_joints_widget.h robot_state.h  (3612 ms)
  collision_env_distance_field.cpp.o  (3560 ms)
  ...

355791 ms: /opt/ros/melodic/include/ros/ros.h (included 246 times, avg 1446 ms), included via:
  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  (2831 ms)
  benchmark_ik.cpp.o  (2428 ms)
  moc_trajectory_panel.cpp trajectory_panel.h  (2427 ms)
  trajectory_panel.cpp.o trajectory_panel.h  (2421 ms)
  warehouse_services.cpp.o  (2412 ms)
  motion_planning_frame_states.cpp.o state_storage.h moveit_message_storage.h database_connection.h message_collection.h query_results.h message_with_metadata.h metadata.h  (2356 ms)
  ...

228412 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_ros/planning/planning_scene_monitor/include/moveit/planning_scene_monitor/planning_scene_monitor.h (included 74 times, avg 3086 ms), included via:
  state_validation_service_capability.cpp.o state_validation_service_capability.h move_group_capability.h  (6736 ms)
  clear_octomap_service_capability.cpp.o clear_octomap_service_capability.h move_group_capability.h  (6683 ms)
  query_planners_service_capability.cpp.o query_planners_service_capability.h move_group_capability.h  (6575 ms)
  move_action_capability.cpp.o move_action_capability.h move_group_capability.h  (6414 ms)
  move_group.cpp.o  (6381 ms)
  execute_trajectory_action_capability.cpp.o execute_trajectory_action_capability.h move_group_capability.h  (6351 ms)
  ...

217365 ms: /opt/ros/melodic/include/urdf/model.h (included 211 times, avg 1030 ms), included via:
  state_validity_checker.cpp.o state_validity_checker.h threadsafe_state_storage.h robot_state.h robot_model.h  (2621 ms)
  motion_planning_frame_joints_widget.cpp.o motion_planning_frame_joints_widget.h robot_state.h robot_model.h  (2389 ms)
  robot_state_visualization.cpp.o robot_state_visualization.h robot_state.h robot_model.h  (2287 ms)
  interaction_handler.cpp.o interaction_handler.h locked_robot_state.h robot_state.h robot_model.h  (2286 ms)
  constraint_sampler_manager_loader.cpp.o constraint_sampler_manager_loader.h constraint_sampler_manager.h constraint_sampler_allocator.h constraint_sampler.h planning_scene.h robot_model.h  (2266 ms)
  planning_response.cpp.o planning_response.h robot_trajectory.h robot_state.h robot_model.h  (2263 ms)
  ...

197874 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_state/include/moveit/robot_state/robot_state.h (included 205 times, avg 965 ms), included via:
  state_validity_checker.cpp.o state_validity_checker.h threadsafe_state_storage.h  (4311 ms)
  threadsafe_state_storage.cpp.o threadsafe_state_storage.h  (3923 ms)
  imarker_robot_state.cpp.o conversions.h  (3872 ms)
  motion_planning_frame_joints_widget.cpp.o motion_planning_frame_joints_widget.h  (3781 ms)
  collision_common_distance_field.cpp.o collision_common_distance_field.h  (3687 ms)
  robot_state_visualization.cpp.o robot_state_visualization.h  (3620 ms)
  ...

193756 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/planning_scene/include/moveit/planning_scene/planning_scene.h (included 149 times, avg 1300 ms), included via:
  constraint_sampler_manager_loader.cpp.o constraint_sampler_manager_loader.h constraint_sampler_manager.h constraint_sampler_allocator.h constraint_sampler.h  (4235 ms)
  default_constraint_samplers.cpp.o default_constraint_samplers.h constraint_sampler.h  (4106 ms)
  constraint_sampler_manager.cpp.o constraint_sampler_manager.h constraint_sampler_allocator.h constraint_sampler.h  (4100 ms)
  constraint_sampler_tools.cpp.o constraint_sampler_tools.h constraint_sampler.h  (4092 ms)
  end_effectors_widget.cpp.o end_effectors_widget.h moveit_config_data.h  (4034 ms)
  constraint_sampler.cpp.o constraint_sampler.h  (4021 ms)
  ...

175445 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model_group.h (included 218 times, avg 804 ms), included via:
  state_validation_service_capability.cpp.o state_validation_service_capability.h move_group_capability.h planning_scene_monitor.h planning_scene.h robot_model.h  (1349 ms)
  execute_trajectory_action_capability.cpp.o execute_trajectory_action_capability.h move_group_capability.h planning_scene_monitor.h planning_scene.h robot_model.h  (1272 ms)
  end_effectors_widget.cpp.o end_effectors_widget.h moveit_config_data.h planning_scene.h robot_model.h  (1257 ms)
  planning_groups_widget.cpp.o planning_groups_widget.h moveit_config_data.h planning_scene.h robot_model.h  (1213 ms)
  start_screen_widget.cpp.o start_screen_widget.h moveit_config_data.h planning_scene.h robot_model.h  (1202 ms)
  clear_octomap_service_capability.cpp.o clear_octomap_service_capability.h move_group_capability.h planning_scene_monitor.h planning_scene.h robot_model.h  (1199 ms)
  ...

151753 ms: /usr/include/eigen3/Eigen/Geometry (included 258 times, avg 588 ms), included via:
  bodies.cpp.o bodies.h aabb.h  (1252 ms)
  time_optimal_trajectory_generation.cpp.o  (1251 ms)
  aabb.cpp.o aabb.h  (1246 ms)
  aabb.cpp.o aabb.h  (1160 ms)
  link_model.cpp.o link_model.h  (1083 ms)
  execute_trajectory_action_capability.cpp.o execute_trajectory_action_capability.h move_group_capability.h planning_scene_monitor.h planning_scene.h robot_model.h joint_model_group.h joint_model.h  (964 ms)
  ...

148347 ms: /home/jafar/workspaces/ros/ws_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model.h (included 225 times, avg 659 ms), included via:
  planar_joint_model.cpp.o planar_joint_model.h  (2069 ms)
  fixed_joint_model.cpp.o fixed_joint_model.h  (2038 ms)
  prismatic_joint_model.cpp.o prismatic_joint_model.h  (2006 ms)
  floating_joint_model.cpp.o floating_joint_model.h  (1984 ms)
  joint_model.cpp.o  (1877 ms)
  revolute_joint_model.cpp.o revolute_joint_model.h  (1842 ms)
  ...

119413 ms: /usr/include/boost/function.hpp (included 2856 times, avg 41 ms), included via:
  kinematics_plugin_loader.cpp.o kinematics_plugin_loader.h  (1168 ms)
  pick_place_params.cpp.o server.h  (1120 ms)
  trajectory_visualization.cpp.o string.hpp split.hpp iter_find.hpp find_iterator.hpp find_iterator.hpp  (747 ms)
  world_diff.cpp.o world_diff.h world.h  (732 ms)
  collision_matrix.cpp.o collision_matrix.h collision_common.h  (728 ms)
  world.cpp.o world.h  (723 ms)
  ...

System info:

v4hn commented 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.

henningkayser commented 4 years ago

@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.

JafarAbdi commented 4 years ago

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)
  ...