openFrameworks
openFrameworks copied to clipboard
The speed of the compilation is too slow in MSYS2
It took me half an hour to compile OF by using MSYS2 MinGW. I found most of the time was wasted by executing bash scripts instead of gcc/g++ itself spent. Could you please enhance the bash scripts to increase the speed?
That does seem slow. Could you share the exact commands ( and order ) you used?
I will try and reproduce here. Curious if its easy to try the Visual Studio release how long it takes to compile examples/templates/emptyExample/
cc @oxillo
I have just modified JOBS
at the 10th line of scripts\msys2\compileOF.sh:
#!/usr/bin/env bash
export LC_ALL=C
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null
BUILD="install"
JOBS=16
but it didn't take any effects compileOF.sh
That does seem slow. Could you share the exact commands ( and order ) you used?
I will try and reproduce here. Curious if its easy to try the Visual Studio release how long it takes to compile examples/templates/emptyExample/
Some hints / comments
- Compile_OF.sh will build both the Debug and Release libs. So, it takes twice the time...
- What are the specs of your machine? On a old computer, half an hour wouldn't surprise me so much. On my 7 years old laptop (4cores, 16G), it took me almost 25min to compile the 'master' branch with MINGW64 with default options (JOBS=1) and 15min with -j6 (JOBS=6)
- The compilation process is heavy on file access (read/write). Your antivirus may want to check every access....
- How do you observe/measure this is the bash script that is slowing down the compilation process ?
Some hints / comments
- Compile_OF.sh will build both the Debug and Release libs. So, it takes twice the time...
- What are the specs of your machine? On a old computer, half an hour wouldn't surprise me so much. On my 7 years old laptop (4cores, 16G), it took me almost 25min to compile the 'master' branch with MINGW64 with default options (JOBS=1) and 15min with -j6 (JOBS=6)
- The compilation process is heavy on file access (read/write). Your antivirus may want to check every access....
- How do you 观察/measure this is the bash script that is slowing down the compilation process ?
I used my HDD to compile it, too, not SSD. Before compiling, I closed all my antiviruses. During compiling, I just opened Windows Task Manager and saw the waveform of the disk I/O status chart. My hard drive only worked every 20 seconds (Can be sure that there isn't anything wrong with my hard disk and my CPU is i5-11300H, very quick).
https://stackoverflow.com/questions/929495/why-is-mingw-very-slow https://stackoverflow.com/a/66716937/9216273
@3119369616 are you still using msys2 / openFrameworks?