Jump to content

Slow compilation on MacOSX


Guest Woweur

Recommended Posts

Hi, i have a little "problem" when i compile MaNGOS on MacOSX with gcc (i have try with gcc 4.2, 4.3 & 4.5). In fact, the compilation of the project game is very slow (20-30 mins). On debian, i haven't that problem with the similary hardware.

My hardware config :

I7 2.66 GHZ

SSD

4 GO

I don't understand because on debian, the compilation of the game project is 2-3 mins :/

Thx.

Link to comment
Share on other sites

The speed difference is in my opinion too huge... Maybe you're don't cache the results and every time do a complete recompile? Or do you mean an complete recompile?

I could time my compile if it help's?... but I think it's about 10min for game and I have only an MacBook "13.

Link to comment
Share on other sites

The problem with precompiled headers in GCC is either

  • * in the g++ itself (well, it's optimization), since almost nobody uses precompiled headers on *nix
    * in the mangos build system (hosed automake build system / messed up dependencies)
    * in the precompiled headers automake patch (I know, it's maybe the one made by me with performance gain like 5-7%)

Another way to speed up build process is to avoid using superlarge .h files (Player.h, Unit.h, ...) and split those, along with the .cpp files itself, into many smaller parts, so other .cpp files can include only the parts they're interested in. This actually saves quite a lot of time (at least on a C project using gcc, but - in theory - all compilers should benefit).

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use