当前位置:网站首页>QT method of compiling projects using multithreading

QT method of compiling projects using multithreading

2022-06-23 06:46:00 Pepsi__

Recently, I found that the compilation speed of new projects is very slow , Look at the configuration of the computer ,10 Generation i5 processor , Powerful 6 The core 12 Thread processing power , At compile time, only 10% Of cpu Occupy , Only one thread is used to compile , It's obviously not playing cpu All the strength of . In this case, turn on make Multithreaded compilation mode

Click item , Build and run , In the build step . Click on make Later details , stay make Add... To the parameters -j 12 This parameter , It means using 12 Thread compiler
 Insert picture description here
After that, the compilation speed is greatly accelerated ,cpu The utilization rate has reached 90%.
For powerful cpu, Is to squeeze its performance . I am waiting for the result , And you cpu But slowly 10% The usage rate of is compiling . It really doesn't look good !

原网站

版权声明
本文为[Pepsi__]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230506111142.html