views:

46

answers:

2

Hello,

I used to develop using Visual Studio on windows... (C++)

we recently migrated our app to linux (red-hat) , and currently each employee is building his own app is his own virtual machine using Vmware. out native OS is still Windows.

At first, it seemed that building using g++ was faster then using VS compiler, however, after some time, it seems like it tured out to be pretty slow. Is it beacuse we're using Vmware ? are there things we can do to accelerate the building process ?

+2  A: 

g++ is not a speed daemon, but it performs well. Yes, a VM can have unsteady performance, especially on disk access. You can always try ccache to avoid recompiling the parts you don't need to.

Or, ditch VMWare (and windows underneath) and do it all on Linux. either with a dedicated build box, or on your own machine. if you have to have a full featured GUI for writing, QtCreator is quite up to the task (no, it's not tied to only writing Qt applications).

Javier
+2  A: 

I never really noticed that g++ was slower than VS or the opposite, but there is ways to make g++ go a lot faster.

  • ccache for instance. I tried it and it really speeds up the compilation.

    ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching previous compilations and detecting when the same compilation is being done again

  • If you're working on a multicore machine you probably want to do multiprocess compilation, if you're using make you can do make -jX where X is your number of cores. Note you'll have to enable multicore on your virtual machines.

  • Disable compiler optimizations.

That said, whatever you do, compilation on a virtual machine wont be as efficient as compilation on a real machine.

f4