Skip to content
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

Included headers changes after running include-what-you-use tool #1503

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

fspindle
Copy link
Contributor

@fspindle fspindle commented Nov 7, 2024

The objective of this PR is to see if suggestions reported by include-what-you-use (IWYU) tool can speed up ViSP build process.

IWYU can be tested following ci/docker/ubuntu-24.04-IWYU/README.md instructions.

  • On Apple M1 Pro, when building this PR with time make -j10 we obtain:
    1754,54s user 183,09s system 886% cpu 3:38,55 total
    1753,80s user 183,88s system 889% cpu 3:37,80 total
    
  • while building https://lagadic/visp master branch (without changes reported by IWYU) we obtain:
    1760,97s user 179,35s system 881% cpu 3:40,06 total
    1763,88s user 180,12s system 890% cpu 3:38,33 total
    

For the moment I'm not convinced:

  • the gain doesn't seem significant
  • it involves so many changes that it can break up the build on a specific architecture

If you have an opinion, I'd be interested (@SamFlt @rolalaro @s-trinh and others...)

@fspindle
Copy link
Contributor Author

fspindle commented Nov 7, 2024

This is the profiling logs using Clang Build Analyzer tool as explained in the wiki.

Analyzing build trace from 'visp-clang_build_session_analyse.bin'...
**** Time summary:
Compilation (1937 times):
  Parsing (frontend):         1664.4 s
  Codegen & opts (backend):    217.7 s

**** Files that took longest to parse (compiler frontend):
  7144 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/tutorial/ar/CMakeFiles/tutorial-panda3d-renderer.dir/tutorial-panda3d-renderer.cpp.o
  6175 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DBaseRenderer.cpp.o
  5756 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DRGBRenderer.cpp.o
  5633 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DPostProcessFilter.cpp.o
  5582 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DRendererSet.cpp.o
  5256 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DCommonFilters.cpp.o
  5166 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DGeometryRenderer.cpp.o
  4762 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/ar/CMakeFiles/visp_ar.dir/src/panda3d-simulator/vpPanda3DRenderParameters.cpp.o
  4487 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/tutorial/segmentation/color/CMakeFiles/tutorial-hsv-segmentation-pcl-viewer.dir/tutorial-hsv-segmentation-pcl-viewer.cpp.o
  4234 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/tutorial/tracking/model-based/generic/CMakeFiles/tutorial-mb-generic-tracker-live.dir/tutorial-mb-generic-tracker-live.cpp.o

**** Files that took longest to codegen (compiler backend):
  7220 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/3rdparty/catch2/CMakeFiles/visp_catch2.dir/catch_amalgamated.cpp.o
  3753 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/mbt/CMakeFiles/visp_mbt.dir/src/vpMbGenericTracker.cpp.o
  2455 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/io/CMakeFiles/catchJsonArgumentParser.dir/test/catchJsonArgumentParser.cpp.o
  2350 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/tutorial/tracking/dnn/CMakeFiles/tutorial-megapose-live-single-object-tracking.dir/tutorial-megapose-live-single-object-tracking.cpp.o
  2251 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/core/CMakeFiles/perfMatrixMultiplication.dir/test/math/perfMatrixMultiplication.cpp.o
  2179 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/io/CMakeFiles/visp_io.dir/src/image/private/vpImageIoTinyEXR.cpp.o
  2065 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/vision/CMakeFiles/visp_vision.dir/src/key-point/vpKeyPoint.cpp.o
  2030 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/detection/CMakeFiles/visp_detection.dir/src/dnn/vpDetectorDNNOpenCV.cpp.o
  1952 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/io/CMakeFiles/visp_io.dir/src/image/private/vpImageIoStb.cpp.o
  1899 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/modules/core/CMakeFiles/catchNPZ.dir/test/tools/io/catchNPZ.cpp.o

**** Templates that took longest to instantiate:
112436 ms: vtknlohmann::basic_json<>::parse<const char *> (723 times, avg 155 ms)
 91771 ms: vtknlohmann::detail::parser<vtknlohmann::basic_json<>, vtknlohmann::... (723 times, avg 126 ms)
 75351 ms: vtknlohmann::detail::parser<vtknlohmann::basic_json<>, vtknlohmann::... (723 times, avg 104 ms)
 52420 ms: vtknlohmann::basic_json<>::basic_json (2899 times, avg 18 ms)
 42519 ms: from_json<vtknlohmann::basic_json<>> (731 times, avg 58 ms)
 41416 ms: vtknlohmann::basic_json<>::value<vpCameraParameters::vpCameraParamet... (521 times, avg 79 ms)
 40499 ms: vtknlohmann::basic_json<>::get_impl<vpCameraParameters::vpCameraPara... (521 times, avg 77 ms)
 40477 ms: vtknlohmann::adl_serializer<vpCameraParameters::vpCameraParametersPr... (521 times, avg 77 ms)
 40454 ms: vtknlohmann::detail::from_json_fn::operator()<vtknlohmann::basic_jso... (521 times, avg 77 ms)
 33822 ms: vtknlohmann::basic_json<>::json_value::json_value (3624 times, avg 9 ms)
 29034 ms: vtknlohmann::detail::json_sax_dom_callback_parser<vtknlohmann::basic... (723 times, avg 40 ms)
 25916 ms: vtknlohmann::detail::hash<vtknlohmann::basic_json<>> (723 times, avg 35 ms)
 21588 ms: std::is_nothrow_move_constructible<vtknlohmann::basic_json<>> (723 times, avg 29 ms)
 19138 ms: vtknlohmann::operator== (528 times, avg 36 ms)
 17985 ms: vtknlohmann::detail::json_sax_dom_callback_parser<vtknlohmann::basic... (723 times, avg 24 ms)
 16861 ms: to_json<double> (722 times, avg 23 ms)
 14907 ms: vtknlohmann::detail::json_sax_dom_callback_parser<vtknlohmann::basic... (723 times, avg 20 ms)
 13718 ms: vtknlohmann::basic_json<>::create<std::map<std::string, vtknlohmann:... (723 times, avg 18 ms)
 13477 ms: std::map<std::string, vtknlohmann::basic_json<>, std::less<void>>::map (1437 times, avg 9 ms)
 12307 ms: std::allocator_traits<std::allocator<std::map<std::string, vtknlohma... (723 times, avg 17 ms)
 12279 ms: std::allocator<std::map<std::string, vtknlohmann::basic_json<>, std:... (723 times, avg 16 ms)
 12116 ms: to_json<vtknlohmann::basic_json<>> (761 times, avg 15 ms)
 10259 ms: vtknlohmann::basic_json<>::basic_json<std::string &, std::string, 0> (722 times, avg 14 ms)
 10237 ms: from_json<double> (722 times, avg 14 ms)
 10206 ms: vtknlohmann::adl_serializer<std::string>::to_json<vtknlohmann::basic... (722 times, avg 14 ms)
 10186 ms: vtknlohmann::detail::to_json_fn::operator()<vtknlohmann::basic_json<... (722 times, avg 14 ms)
 10013 ms: vtknlohmann::detail::to_json<vtknlohmann::basic_json<>, std::string,... (722 times, avg 13 ms)
  9992 ms: vtknlohmann::detail::external_constructor<vtknlohmann::detail::value... (729 times, avg 13 ms)
  9971 ms: vtknlohmann::detail::conjunction<vtknlohmann::detail::negation<std::... (723 times, avg 13 ms)
  9893 ms: vtknlohmann::detail::conjunction<vtknlohmann::detail::negation<std::... (723 times, avg 13 ms)

**** Template sets that took longest to instantiate:
112526 ms: vtknlohmann::basic_json<$>::parse<$> (738 times, avg 152 ms)
 91818 ms: vtknlohmann::detail::parser<$>::parse (738 times, avg 124 ms)
 82400 ms: vtknlohmann::detail::parser<$>::sax_parse_internal<$> (1476 times, avg 55 ms)
 56561 ms: Eigen::MatrixBase<$> (12147 times, avg 4 ms)
 55057 ms: vtknlohmann::basic_json<$>::get_impl<$> (3866 times, avg 14 ms)
 54447 ms: vtknlohmann::adl_serializer<$>::from_json<$> (3728 times, avg 14 ms)
 53416 ms: Eigen::Map<$> (6701 times, avg 7 ms)
 52756 ms: from_json<$> (1453 times, avg 36 ms)
 48582 ms: vtknlohmann::basic_json<$>::create<$> (12105 times, avg 4 ms)
 43905 ms: vtknlohmann::detail::conjunction<$> (10789 times, avg 4 ms)
 43751 ms: std::__dispatch_copy_or_move<$> (16553 times, avg 2 ms)
 43568 ms: vtknlohmann::basic_json<$>::value<$> (967 times, avg 45 ms)
 42423 ms: vtknlohmann::basic_json<$>::basic_json (2188 times, avg 19 ms)
 41813 ms: Eigen::DenseBase<$> (15342 times, avg 2 ms)
 41357 ms: std::__unwrap_and_dispatch<$> (16235 times, avg 2 ms)
 40454 ms: vtknlohmann::detail::from_json_fn::operator()<vtknlohmann::basic_jso... (521 times, avg 77 ms)
 40310 ms: vtknlohmann::detail::is_detected_lazy<$> (10586 times, avg 3 ms)
 39503 ms: std::vector<$>::push_back (5534 times, avg 7 ms)
 38340 ms: std::vector<$>::__swap_out_circular_buffer (7126 times, avg 5 ms)
 35274 ms: Eigen::MapBase<$> (7629 times, avg 4 ms)
 34782 ms: vtknlohmann::basic_json<$>::basic_json<$> (6446 times, avg 5 ms)
 33826 ms: vtknlohmann::adl_serializer<$>::to_json<$> (5643 times, avg 5 ms)
 33822 ms: vtknlohmann::basic_json<$>::json_value::json_value (3624 times, avg 9 ms)
 32683 ms: std::vector<$>::__push_back_slow_path<$> (4658 times, avg 7 ms)
 32231 ms: std::__uninitialized_allocator_move_if_noexcept<$> (7085 times, avg 4 ms)
 31172 ms: std::__copy<$> (8916 times, avg 3 ms)
 30734 ms: std::vector<$> (19294 times, avg 1 ms)
 29034 ms: vtknlohmann::detail::json_sax_dom_callback_parser<$>::end_object (723 times, avg 40 ms)
 29030 ms: std::allocator_traits<$>::construct<$> (7680 times, avg 3 ms)
 28978 ms: to_json<$> (1483 times, avg 19 ms)

**** Functions that took longest to compile:
   361 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/image/testImageMeanAndStdev.cpp)
   269 ms: CATCH2_INTERNAL_TEST_0() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/detection/test/apriltag-with-dataset/catchAprilTag.cpp)
   237 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/tools/geometry/testImageCircle.cpp)
   190 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/image-with-dataset/testPerformanceLUT.cpp)
   166 ms: CATCH2_INTERNAL_TEST_0() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/io/test/catchJsonArgumentParser.cpp)
   166 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/vision/test/pose/testPose.cpp)
   150 ms: bool (anonymous namespace)::run<unsigned char>(std::__1::basic_strin... (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp)
   143 ms: tinyexr::DecodePixelData(unsigned char**, int const*, unsigned char ... (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/io/src/image/private/vpImageIoTinyEXR.cpp)
   140 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/robot/test/servo-pololu/testPololuVelocity.cpp)
   140 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp)
   136 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/tools/io-with-dataset/testIoTools.cpp)
   133 ms: CATCH2_INTERNAL_TEST_0() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/tools/io/catchNPZ.cpp)
   133 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/tracker/mbt/test/generic-with-dataset/testGenericTrackerDepth.cpp)
   132 ms: CATCH2_INTERNAL_TEST_0() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/math/catchRotation.cpp)
   131 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/tutorial/detection/dnn/tutorial-dnn-object-detection-live.cpp)
   126 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/example/calibration/calibrate-camera.cpp)
   126 ms: vpMbTracker::loadCAOModel(std::__1::basic_string<char, std::__1::cha... (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/tracker/mbt/src/vpMbTracker.cpp)
   124 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/tutorial/tracking/model-based/generic-rgbd/tutorial-mb-generic-tracker-rgbd-realsense.cpp)
   121 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/demo/wireframe-simulator/servoSimu4Points.cpp)
   119 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/image-with-dataset/testImageFilter.cpp)
   118 ms: bool (anonymous namespace)::run<vpRGBa>(std::__1::basic_string<char,... (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp)
   113 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/math/testSPC.cpp)
   110 ms: CATCH2_INTERNAL_TEST_0() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/visual_features/test/feature/catchLuminanceMapping.cpp)
   109 ms: CATCH2_INTERNAL_TEST_32() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/image-with-dataset/catchImageWarp.cpp)
   108 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/robot/test/servo-pololu/testPololuPosition.cpp)
   103 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/tutorial/imgproc/brightness/tutorial-compare-auto-gamma.cpp)
   101 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp)
   100 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/example/tracking/mbtGenericTrackingDepth.cpp)
   100 ms: main (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/test/math/testMatrixInitialization.cpp)
   100 ms: vpFeatureMomentCInvariant::compute_interaction() (/Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/visual_features/src/visual-feature/vpFeatureMomentCInvariant.cpp)

**** Function sets that took longest to compile / optimize:
  1200 ms: std::__1::ostreambuf_iterator<$> std::__1::__pad_and_output[abi:ne18... (742 times, avg 1 ms)
  1159 ms: vpArray2D<$>::resize(unsigned int, unsigned int, bool, bool) (365 times, avg 3 ms)
  1088 ms: std::__1::basic_ostream<$>& std::__1::__put_character_sequence[abi:n... (742 times, avg 1 ms)
   644 ms: void Simd::Base::BlurImage<$>(Simd::BlurParam const&, Simd::Base::Al... (16 times, avg 40 ms)
   510 ms: vpImage<$>::init(unsigned int, unsigned int) (231 times, avg 2 ms)
   447 ms: void Simd::Neon::BlurImage<$>(Simd::BlurParam const&, Simd::Base::Al... (8 times, avg 55 ms)
   440 ms: void vpImageFilter::filterY<$>(vpImage<$> const&, vpImage<$>&, doubl... (28 times, avg 15 ms)
   431 ms: std::__1::vector<$> visp::cnpy::create_npy_header<$>(std::__1::vecto... (31 times, avg 13 ms)
   368 ms: void vpImageFilter::filter<$>(vpImage<$> const&, vpImage<$>&, vpArra... (11 times, avg 33 ms)
   356 ms: Catch::Benchmark::Detail::BenchmarkFunction::model<$>::call(Catch::B... (171 times, avg 2 ms)
   272 ms: std::__1::vector<$>::__append(unsigned long) (117 times, avg 2 ms)
   269 ms: bool (anonymous namespace)::run<$>(std::__1::basic_string<$> const&,... (2 times, avg 134 ms)
   236 ms: bool vtknlohmann::detail::parser<$>::sax_parse_internal<$>(vtknlohma... (12 times, avg 19 ms)
   233 ms: vtknlohmann::detail::lexer<$>::scan_string() (12 times, avg 19 ms)
   230 ms: std::__1::__wrap_iter<$> std::__1::vector<$>::__insert_with_size[abi... (34 times, avg 6 ms)
   225 ms: operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char>... (102 times, avg 2 ms)
   203 ms: std::__1::deque<$>::__add_back_capacity() (21 times, avg 9 ms)
   203 ms: bool vtknlohmann::detail::parser<$>::sax_parse_internal<$>(vtknlohma... (12 times, avg 16 ms)
   187 ms: std::__1::pair<$> std::__1::__tree<$>::__emplace_unique_key_args<$>(... (116 times, avg 1 ms)
   185 ms: void CATCH2_INTERNAL_TEMPLATE_TEST_9<$>() (10 times, avg 18 ms)
   174 ms: Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::... (4 times, avg 43 ms)
   174 ms: void run_test<$>(std::__1::basic_string<$> const&, bool, bool, vpIma... (4 times, avg 43 ms)
   167 ms: void run_test<$>(std::__1::basic_string<$> const&, std::__1::basic_s... (2 times, avg 83 ms)
   156 ms: vpArray2D<$>::loadYAML(std::__1::basic_string<$> const&, vpArray2D<$... (9 times, avg 17 ms)
   155 ms: vtknlohmann::basic_json<$>::json_value::destroy(vtknlohmann::detail:... (16 times, avg 9 ms)
   155 ms: void vpImageFilter::filterX<$>(vpImage<$> const&, vpImage<$>&, doubl... (19 times, avg 8 ms)
   153 ms: vtknlohmann::detail::serializer<$>::dump(vtknlohmann::basic_json<$> ... (10 times, avg 15 ms)
   143 ms: tinyexr::DecodePixelData(unsigned char**, int const*, unsigned char ... (1 times, avg 143 ms)
   134 ms: void std::__1::__tree_balance_after_insert[abi:ne180100]<$>(std::__1... (68 times, avg 1 ms)
   126 ms: vpMbTracker::loadCAOModel(std::__1::basic_string<$> const&, std::__1... (1 times, avg 126 ms)

**** Expensive headers:
447125 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/include/visp3/core/vpImageConvert.h (included 340 times, avg 1315 ms), included via:
  125x: vpDisplayOpenCV.h 
  69x: vpImageIo.h 
  67x: <direct include>
  12x: vpDisplayFactory.h vpDisplayOpenCV.h 
  10x: vpImageFilter.h 
  6x: common.hpp 
  ...

357870 ms: /opt/homebrew/include/pcl-1.14/pcl/impl/point_types.hpp (included 351 times, avg 1019 ms), included via:
  121x: vpDisplayOpenCV.h vpImageConvert.h point_types.h 
  69x: vpImageIo.h vpImageConvert.h point_types.h 
  62x: vpImageConvert.h point_types.h 
  13x: vpRealSense2.h common_headers.h common.h common.hpp point_types.h 
  12x: vpDisplayFactory.h vpDisplayOpenCV.h vpImageConvert.h point_types.h 
  10x: vpImageFilter.h vpImageConvert.h point_types.h 
  ...

356864 ms: /opt/homebrew/include/pcl-1.14/pcl/point_types.h (included 350 times, avg 1019 ms), included via:
  121x: vpDisplayOpenCV.h vpImageConvert.h 
  69x: vpImageIo.h vpImageConvert.h 
  62x: vpImageConvert.h 
  13x: vpRealSense2.h common_headers.h common.h common.hpp 
  12x: vpDisplayFactory.h vpDisplayOpenCV.h vpImageConvert.h 
  10x: vpImageFilter.h vpImageConvert.h 
  ...

208244 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp-build-clang-analyser/include/visp3/core/vpConfig.h (included 947 times, avg 219 ms), included via:
  617x: <direct include>
  40x: vpDebug.h 
  31x: vpCameraParameters.h 
  15x: vpArray2D.h 
  13x: vpImage.h 
  12x: vpImageConvert.h 
  ...

202485 ms: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/regex (included 948 times, avg 213 ms), included via:
  617x: vpConfig.h 
  40x: vpDebug.h vpConfig.h 
  31x: vpCameraParameters.h vpConfig.h 
  15x: vpArray2D.h vpConfig.h 
  13x: vpImage.h vpConfig.h 
  12x: vpImageConvert.h vpConfig.h 
  ...

185996 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/gui/include/visp3/gui/vpDisplayOpenCV.h (included 176 times, avg 1056 ms), included via:
  148x: <direct include>
  14x: vpDisplayFactory.h 
  3x: vpTutoCommonData.h vpDisplayFactory.h 
  3x: vpTutoSegmentation.h vpTutoCommonData.h vpDisplayFactory.h 
  2x: vpSimulatorViper850.h vpRobotWireFrameSimulator.h 
  2x: vpSimulatorAfma6.h vpRobotWireFrameSimulator.h 
  ...

151190 ms: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/iostream (included 677 times, avg 223 ms), included via:
  294x: <direct include>
  104x: vpDebug.h 
  33x: SimdMemory.h 
  32x: vpImage.h vpException.h 
  30x: vpIoTools.h 
  23x: vpException.h 
  ...

146526 ms: /Users/fspindle/soft/visp/visp_ws/test-pr/visp-fspindle/visp/modules/core/include/visp3/core/vpColVector.h (included 722 times, avg 202 ms), included via:
  79x: vpImage.h vpRGBa.h 
  62x: vpIoTools.h vpColor.h vpRGBa.h 
  55x: vpCameraParameters.h 
  40x: <direct include>
  40x: vpHomogeneousMatrix.h vpRotationMatrix.h vpPoseVector.h vpMatrix.h vpForceTwistMatrix.h 
  38x: vpImageConvert.h vpImage.h vpRGBa.h 
  ...

134722 ms: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/string (included 1001 times, avg 134 ms), included via:
  385x: vpConfig.h regex __locale 
  269x: iostream ios __locale 
  33x: SimdMemory.h iostream ios __locale 
  26x: vpDebug.h iostream ios __locale 
  23x: fstream __locale 
  23x: vector formatter_bool.h formatter_integral.h formatter_output.h parser_std_format_spec.h 
  ...

130330 ms: /opt/homebrew/include/vtk-9.3/vtknlohmannjson/include/vtknlohmann/json.hpp (included 723 times, avg 180 ms), included via:
  79x: vpImage.h vpRGBa.h vpColVector.h 
  61x: vpIoTools.h vpColor.h vpRGBa.h vpColVector.h 
  53x: vpCameraParameters.h vpColVector.h 
  38x: vpHomogeneousMatrix.h vpArray2D.h 
  36x: vpImageConvert.h vpImage.h vpRGBa.h vpColVector.h 
  30x: vpDisplay.h vpColor.h vpRGBa.h vpColVector.h 
  ...

  done in 2.4s.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 53.84%. Comparing base (53b3080) to head (795478f).
Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
modules/core/src/tools/network/vpUDPServer.cpp 0.00% 2 Missing ⚠️
modules/core/src/tracking/moments/vpMoment.cpp 0.00% 1 Missing ⚠️
modules/detection/src/dnn/vpDetectorDNNOpenCV.cpp 0.00% 1 Missing ⚠️
modules/detection/src/face/vpDetectorFace.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1503      +/-   ##
==========================================
- Coverage   53.84%   53.84%   -0.01%     
==========================================
  Files         442      442              
  Lines       53850    53844       -6     
==========================================
- Hits        28996    28992       -4     
+ Misses      24854    24852       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@s-trinh
Copy link
Contributor

s-trinh commented Nov 8, 2024

The build times seem to be also roughly the same on my tests:

Master (c2b6c8a) PR (ff7a165)
Run 1 4 minutes and 34 seconds elapsed.

real 5m2,091s
user 48m20,711s
sys 3m28,536s
4 minutes and 35 seconds elapsed.

real 5m3,450s
user 47m50,694s
sys 3m26,207s
Run 2 4 minutes and 32 seconds elapsed.

real 4m59,398s
user 48m51,756s
sys 3m28,693s
4 minutes and 35 seconds elapsed.

real 5m3,540s
user 47m57,146s
sys 3m27,233s
Run 3 4 minutes and 37 seconds elapsed.

real 5m4,798s
user 48m31,211s
sys 3m27,205s
4 minutes and 35 seconds elapsed.

real 5m3,341s
user 47m58,716s
sys 3m26,069s

Going from -j12 to -j4 to try to see what would be the results on an edge device:

Master (c2b6c8a) PR (ff7a165)
Run 1 9 minutes and 11 seconds elapsed.

real 9m39,807s
user 34m0,050s
sys 2m46,109s
9 minutes and 2 seconds elapsed.

real 9m30,662s
user 33m35,289s
sys 2m44,096s

The script:

#!/bin/bash

rm -rf visp-build-time
mkdir visp-build-time && cd visp-build-time
cmake ../visp -DBUILD_JAVA=OFF -DENABLE_AVX=ON

SECONDS=0
# make -j12
make -j4
duration=$SECONDS
echo ""
echo "$((duration / 60)) minutes and $((duration % 60)) seconds elapsed."

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