   Why is compiling so slow?
  Hi guys!I'm working with VisualStudio 9 (Orcas) on a medium-fast PC (only singlecore). Compiling my game (which isn't too big) takes more than one minute. And this can be quite annoying!!So I asked myself why compiling takes so long.Is my PC not fast enough? Would a Quadcore speed it up?Is there something wrong in my software setup?Or is EVERYONE suffering from the same problem?   
  Look at pre-compiled headers...   ;  Also,- Make sure you haven't got any headers included in header files that you dont need.- Make sure you are not including headers when a forward declaration of a type will do.;  Uhh, to be honest I include EVERY Header in EVERY source file! It makes programming so much easier ^^Thats how I do it:I have one Header called AllHeaders.h. In this header there are zillions of includes (one for every header in my project). Now in every cpp file I only have to include AllHeaders.h and get everything I need.May this be the problem?But wouldn't it be waaaay to much work, to individualize the includes for every cpp file?   ;Quote:Original post by VanKurtHi guys!I'm working with VisualStudio 9 (Orcas) on a medium-fast PC (only singlecore). Compiling my game (which isn't too big) takes more than one minute. And this can be quite annoying!!So I asked myself why compiling takes so long.Is my PC not fast enough? Would a Quadcore speed it up?Is there something wrong in my software setup?Or is EVERYONE suffering from the same problem?I'm assuming your game is written in C++. Orcas provides some multi-processor build enhancements. Also make sure you have enough memory so that your build doesn't cause excessive swapping.However, in the end it really depends on your project size. I'd love to be able to build in only a few minutes; I've experienced builds lasting anywhere from 15 minutes to several hours at work.Edit: The posters before my provide valuable advice. Reorganizing your #includes should definitely help.   ;  Is there a way to display build times in VS9?That would make optimizing easier...   ;Quote:Original post by VanKurtMay this be the problem?Yes. Pretty much guaranteed.Quote:But wouldn't it be waaaay to much work, to individualize the includes for every cpp file?No. Each CPP file should only be dealing with code from one related set of functions anyway; one related set of functions will generally all need the same headers.You're right that the whole include mechanism sucks, though. Other languages, like C#, don't have it.   ;  Hey,I experienced the same problems on the last project that i did, and it got to the stage where compile times were very long. Since then i have read about what a few posters above have mentioned regarding where to #include and it does make a huge difference. Does anyone know of an article on how to organise multiple c++ header and source files? Hopefully it maybe also helpful to the origional poster.Thanks   ;  Does something like ccache exist for VS?   ;Organizing Code Files in C and C++.   