CMake configuration takes too long with LCG 103 (libclang 14)
Using LCG 103 and x86_64_v2-centos7-gcc12-opt
it takes 310 seconds to configure Allen. The 103 toolchains added with lhcb-core/lcg-toolchains!123 (merged) set up libclang 14.
It seems that 270 seconds are spent in the two executions of ParseAlgorithms.py
. Instrumenting with cProfile as such
diff --git a/cmake/GenerateConfiguration.cmake b/cmake/GenerateConfiguration.cmake
index aa315e12b..f79d34410 100644
--- a/cmake/GenerateConfiguration.cmake
+++ b/cmake/GenerateConfiguration.cmake
@@ -14,7 +14,7 @@ set(ALLEN_CORE_DIR ${PROJECT_SEQUENCE_DIR}/AllenCore)
set(ALLEN_PARSER_DIR ${PROJECT_SEQUENCE_DIR}/parser)
set(ALGORITHMS_OUTPUTFILE ${ALLEN_ALGORITHMS_DIR}/allen_standalone_algorithms.py)
set(PARSED_ALGORITHMS_OUTPUTFILE ${CODE_GENERATION_DIR}/parsed_algorithms.pickle)
-set(ALGORITHMS_GENERATION_SCRIPT ${PROJECT_SOURCE_DIR}/configuration/parser/ParseAlgorithms.py)
+set(ALGORITHMS_GENERATION_SCRIPT -m cProfile -s cumtime ${PROJECT_SOURCE_DIR}/configuration/parser/ParseAlgorithms.py)
include_guard(GLOBAL)
we get the profiles in log.txt