Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The speed of the compilation is too slow in MSYS2 #6984

Open
3119369616 opened this issue May 17, 2022 · 7 comments
Open

The speed of the compilation is too slow in MSYS2 #6984

3119369616 opened this issue May 17, 2022 · 7 comments

Comments

@3119369616
Copy link

3119369616 commented May 17, 2022

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?

@ofTheo
Copy link
Member

ofTheo commented May 17, 2022

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/

@ofTheo
Copy link
Member

ofTheo commented May 17, 2022

cc @oxillo

@3119369616
Copy link
Author

3119369616 commented May 23, 2022

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/

@oxillo
Copy link
Contributor

oxillo commented May 31, 2022

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 ?

@3119369616
Copy link
Author

3119369616 commented Jun 5, 2022

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).

@dimitre
Copy link
Member

dimitre commented Dec 28, 2023

@3119369616 are you still using msys2 / openFrameworks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants