Slow Build time
-
I am using Qt 5.15.0 and Mingw8.1.0 on my windows i3 4gb ram pc and its taking a very long time to build, I have used CLion and VScode before and they never took this long please help.
-
@Thembalami-Msimango Please provide more information:
- How big is the code base you're building?
- How long is "very long"?
- Did you build same code with CLion and VScode?
- Did you use same compiler in CLion and VScode?
- What buils swystem do you use (qmake, CMake, ...)?
-
@Thembalami-Msimango Interesting. How much longer is the build time compared to CLion and VScode?
Also, do you build in QtCreator or in a terminal?
Did you also try to disable anti-virus software? -
Hi
Newer QCreators should automatically add the -j switch to make it use all cores.
Have a look when you compile with the fast one versus slow one see the sam number of cores in being used in each case. -
-
@Thembalami-Msimango Right click on the graph and select "Logical processors" (or whatever the english text is).
-
@Thembalami-Msimango Go to Project settings ->Build -> Build steps and check what is set in "Parallel jobs" (it should be the number of logical cores of your CPU).
-
I am having trouble understanding what u said there your phrasing knocked me out😅
but there is no parallel jobs option or anything here @jsulm
-
@Thembalami-Msimango said in Slow Build time:
but there is no parallel jobs option or anything here
There is, you need to expand "Details".
But you can already see "-j4" which means 4 build processes are used, so looks good. -
@Thembalami-Msimango The IDE is most probably not the problem here. QtCreator simply calls qmake and then make. You could try to build manually in a terminal to see whether it is also slow or not.
-
If the course instructor is using Ubuntu, then (despite the overhead of installing extra tools), you might find it simplest to:
- install VirtualBox
- create an Ubuntu VM
- use
qmake
in a terminal window inside your Ubuntu VM
Hopefully in this way you can eliminate any discrepancy between the instructor's procedure and your own, and maximize chances of success (with success being defined here as "replicating whatever the instructor is doing without errors").
I would also recommend matching the exact Ubuntu version preferred by the instructor, and the exact Qt version.
-
I should have also mentioned, for completeness: I 100% agree with @jsulm 's hypothesis that "The IDE is most probably not the problem here"
However, the set of possibilities that contains the actual problem could still be a very large set (possibly unbounded?).
Therefore, if you are under a deadline for coursework, that is why I recommend just sticking verbatim to whatever the instructor is doing.