Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is MinGW very slow?

I'm using the Code::Blocks IDE with GCC/MinGW on Windows, and I'm trying to build a wxWidgets application which has ca. 20k lines and 40 source modules. And it builds very very slow.

Compiling a C++ module lasts 2-5 seconds, and linking lasts even 2-3 minutes.

It's a portable code, and this code compiles very fast on Linux. I can't follow the build message window... The entire process lasts less than 20 seconds.

I tried the common tweaks (for example, precompiled header, turn optimizations off, etc.), but nothing worked.

Why is it so slow?

like image 882
Calmarius Avatar asked May 30 '09 10:05

Calmarius


People also ask

How long does MinGW installation take?

It will take 5-6 minutes. After finishing click on Close. After successful installation of MinGW, next step is to change the environment location for MinGW.

Is MinGW-w64 better than MinGW?

MinGW-w64 is a improved version which supports both 32bit and 64bit, and some more of the WinAPI (still not all, because thats much work, but more than MinGW). MinGW-w64 only provides their source code, but no binaries to "just use" the compiler.

Is MinGW a good compiler?

I have found the MinGW-w64 compilers very good, and GCC 4.6 and above (actually, 4.5. 1 and above) are very capable of producing good 64-bit code for Windows. Please remember that MinGW provides essentially the same C API as msvcrt.

Is MinGW necessary for C++?

No, it's not. There are lots of C++ compilers around, for example for Windows there is Visual Studio. But MinGW has C++ compiler as well, so it's an option.


1 Answers

Are you on an Active Directory domain, but not immediately connected to it?

While I don't have the "answer" as to why MinGW would be slow, it has been my experience that computers which belong to an AD domain, but are unable to reach the AD controller, have a delay in starting executables (such as rxvt.exe) and currently running ones experience a pause or stutter (such as emacs, which is built using MinGW).

I am still investigating to determine the actual cause of this behavior, but thought I would mention it in case it applies to you.

like image 74
mdaniel Avatar answered Sep 22 '22 11:09

mdaniel