The compile process takes long time to finish in windows11 vscode?

Dear sir

Is there any related reason or setting that will slow down the compile speed in bosch windows11's vs code remote ssh?

Because, I find out that it takes over 20 minutes to finish a celix rt cpp program by "build and run build task" in vs code, which took only 1~2 minutes to finish in previous windows 10 environment.

I am not sure what is the reason to this phenomenon, it really affects the coding efficiency.

I only build 21 cpps in my project like below:


 *  Executing task: bash build-snap-amd64.sh 

-------------------------------------------------------
Print options ...
-------------------------------------------------------
architecture: amd64
  build type: release
   verbosity: verbose
-------------------------------------------------------
Build with cmake presets ...
-------------------------------------------------------
Preset CMake variables:

  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_INSTALL_PREFIX:PATH="/home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/generated"
  CMAKE_TOOLCHAIN_FILE:FILEPATH="/home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/../../cmake/toolchain/linux-amd64.cmake"
  SDK_ROOT_DIR="/home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/../.."

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using zip to create bundles
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found libuuid: /usr/lib/x86_64-linux-gnu/libuuid.so  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.81.0")  
-- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so  
-- Found jansson: /usr/lib/x86_64-linux-gnu/libjansson.so  
-- Found libffi: /usr/lib/x86_64-linux-gnu/libffi.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/build
[  0%] Built target com.boschrexroth.sdk.rt.scheduler
[  4%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/BundleActivator.cpp.o
[  8%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/Component.cpp.o
[ 13%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/global_variable.cpp.o
[ 17%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/motion.cmd/motion_cmd.cpp.o
[ 21%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/force.cmd/force_cmd.cpp.o
[ 26%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/file.cmd/file_cmd.cpp.o
[ 30%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/file.cmd/lib_json/json_reader.cpp.o
[ 34%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/file.cmd/lib_json/json_value.cpp.o
[ 39%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/file.cmd/lib_json/json_writer.cpp.o
[ 43%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/nrt.node.cmd/nrt_node_cmd.cpp.o
[ 47%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/lib/rt.node.cmd/rt_node_cmd.cpp.o
[ 52%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/trace/trace_cmd.cpp.o
[ 56%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/1_high/scheduler_high.cpp.o
[ 60%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/1_high/fun/pressing.fun/pressing_fun.cpp.o
[ 65%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/1_high/fun/curve.fun/curve_fun.cpp.o
[ 69%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/1_high/fun/interpreter.fun/interpreter_fun.cpp.o
[ 73%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/2_mid/scheduler_mid.cpp.o
[ 78%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/2_mid/fun/evaluation.cmd/evaluation_cmd.cpp.o
[ 82%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/scheduler/3_low/scheduler_low.cpp.o
[ 86%] Building CXX object src/CMakeFiles/sdk_rt_di_do.dir/threads/thread_1.cpp.o
[ 91%] Linking CXX shared library libsdk_rt_di_do.so
[ 91%] Built target sdk_rt_di_do
[ 95%] Generating ../celix/gen/bundles/com.boschrexroth.sdk.rt.scheduler/lib-sdk_rt_di_do-copy-timestamp
[100%] Packaging com.boschrexroth.sdk.rt.scheduler
[100%] Built target com.boschrexroth.sdk.rt.scheduler_bundle
[100%] Built target celix-bundles
[100%] Built target celix-containers
[100%] Built target celix-build-docker-dirs
[100%] Built target celix-runtimes
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/generated/bundle/com.boschrexroth.sdk.rt.scheduler.zip
-------------------------------------------------------
Snapcraft clean and build  ...
-------------------------------------------------------
Cleaning all parts                                                                                                                                                       
Starting Snapcraft 7.5.6                                                                                                                                                 
Logging execution to '/root/.local/state/snapcraft/log/snapcraft-20241230-041703.210396.log'                                                                             
Skipping build-on: arm64 build-for: ['amd64'] because build-on doesn't match host arch: amd64                                                                            
Skipping build-on: arm64 build-for: ['arm64'] because build-on doesn't match host arch: amd64                                                                            
Running on amd64 for amd64                                                                                                                                               
Initializing parts lifecycle                                                                                                                                             
Executing parts lifecycle...                                                                                                                                             
Executing parts lifecycle: pull bundle                                                                                                                                   
Executing action                                                                                                                                                         
Executed: pull bundle                                                                                                                                                    
Executing parts lifecycle: build bundle                                                                                                                                  
Executing action                                                                                                                                                         
:: + cp --archive --link --no-dereference . /home/boschrexroth/scripts/ctrlx-automation-sdk/sample-rt/public/samples-cpp/cn.2.06/parts/bundle/install          
Executed: build bundle                                                                                                                                                   
Executing parts lifecycle: stage bundle                                                                                                                                  
Executing action                                                                                                                                                         
Executed: stage bundle                                                                                                                                                   
Executing parts lifecycle: prime bundle                                                                                                                                  
Executing action                                                                                                                                                         
Executed: prime bundle                                                                                                                                                   
Executed parts lifecycle                                                                                                                                                 
Extracting and updating metadata...                                                                                                                                      
Copying snap assets...                                                                                                                                                   
Generating snap metadata...                                                                                                                                              
Generated snap metadata                                                                                                                                                  
Reading snap metadata...                                                                                                                                                 
Running linters...                                                                                                                                                       
Running linter: classic                                                                                                                                                  
Running linter: library                                                                                                                                                  
Creating snap package...                                                                                                                                                 
Created snap package cn_2.06.00_amd64.snap                                                                                                                     
 *  Terminal will be reused by tasks, press any key to close it. 

Another non-ctrlX-related question about the forum, do you know why I can not upload the picture or file in this forum?

Best reply by nickH

Hi KangZhihao
When the performance of the App Build Environment is slow, I would recommend to take a look at the hardware acceleration settings on your PC.

Like this you can check in ctrlX WORKS if the Hardware Acceleration is active:

There is now known issue with Windows 11. I personally also use Windows 11 and it works fine.

But I had once a problem with Windows Hypervisor Platform and what helped me was to deactivate the Windows Hypervisor Platform in the Windows Features, restart my PC, activate it again and restart again.

Best regards,

Nick

View original
2 replies