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, ...)?
-
@jsulm the code is not that long, the compiler is the same as of CLion and VScode and I'm using qmake (its just an intro. to my intro. to data structures and algorithms class.......we were just unit testing)
-
@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. -
@jsulm I build in Qt Creator, and it takes a really long time I literally have to wait some time for it to complete.....and I dont have antivirus
-
@mrjj I don't understand this😅
-
-
@mrjj
mine has 2 cores but I think its showing only one when its like this
-
@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).
-
Thembalami Msimangowrote on 9 Aug 2021, 12:09 last edited by Thembalami Msimango 8 Sept 2021, 12:10
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. -
@jsulm Eish ohk I see, I guess I will have to switch to a different IDE since this one seems to have problems beyond reach, thank you
-
@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.
-
@jsulm problem is I don't know how to build on terminal...and my lecturer was building on terminal but he is using UBUNTU......is there a tutorial maybe on how to build on terminal
-
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.
5/18