2
votes

When I run a project build of an Ada project (gpr) on windows using gprbuild (whether in GNAT GPL or cygwin), it is very slow. Even a simple project compilation takes minutes. The same project compilation under Linux takes a few seconds. Is there a way to speed compilation up under Windows?

1
This conflicts with my experience. Please provide a complete, minimal demonstrator for us to study.Jacob Sparre Andersen
@Jacob, I tried with some simple example such as 'hello world' and effect is the same. The 'gpr' file is very simple as well: project Hello is for Source_Dirs use ("src"); for Object_Dir use "obj"; for Main use ("hello.adb"); for Exec_Dir use "./"; end Hello;NeoSer
This does sound like an installation problem of some kind, but "Windows" is too vague to help pin it down. Two random thoughts : I've seen anti-virus programs mess with other dev tools (but not an Ada compiler). You might try installing the FSF gcc/gnat (should find it from www.getadanow.com ). I can't help with Windows because I use the mingw cross compilers on Debian to make Windows executables. Okay, three I suppose.user_1818839
Thanks for the comments. I will look if some antivirus SW slows down the compilation.NeoSer

1 Answers

4
votes

My experience is that compilation time is similar. However, I have noticed with updates to my antivirus on Windows this last year, that it now scans each and every program before allowing it to run. This slowed down my compilation drastically. I had to go into my antivirus and whitelist all the GNAT programs (gnatmake, gprconfig, etc.) or each step took several seconds.

It might be something to look at. With everything whitelisted, compilation time is about the same using GNAT GPL 2016, GNAT GPL 2017, and GNAT FSF 7.2 on mingw64 on windows and using the OS supplied GNAT on linux