Re: [GD-General] Compile times
Brought to you by:
vexxed72
From: Ray <ra...@gu...> - 2002-12-09 21:59:03
|
Our game compiles in about 5 minutes in VC++6 for a full rebuild. A simple fix will just recompile that one file and link, mainly, unless I edit a root header file, which then it recompiles all the files that header file gets included in (it's very rare for us to edit a root header file). On macosx, compile for the same code takes about 45 minutes. On linux, about 30 for a full rebuild. I love vc++'s ability to compile fast. We use STL extensively. Well, we use map, list, vector a lot. I know we can rewrite teh stl stuff to use our own stuff, but our owk stuff won't be much faster in runtime and that's just more stuff that would need to be debugged. I only use vector if I need to sort, because I can never seem to get list.sort() to work. We use maps a lot for string lookups. We even use deque, set, queue for some things. It's just very convenient to use STL when making something go as soon as possible. Noel Llopis wrote: > I'm totally impressed. When you say complete build times, that means > *all* the code involved in Quake 2 or Quake 3? All the DLLs, everything? > Was there some trick you were using to get such incredible build times > (other than using straight C)? > > We're using C++ and STL, and even though we have a good physical > organization (like Lakos described), compiling all our libraries and > game code for one platform could take up to 15-20 minutes. That's only > for a full build; a quick change somewhere still requires building that > file and then doing a link, which is about 30-40 seconds. > > I find 30-40 seconds for a trivial change close to unbearable. > Especially when it takes another 10 seconds for the game to start and > another 10 seconds for the level to load. Linking should never take 30-40 seconds. VC++ linking for me is about the time it takes for the harddrive to save the file. (debug is about 3 megs, release is 1.6megs) Linking for the mac is slower, but that's because the file is much larger. (20 megs for a debug version! 2.6 megs for release) More RAM is the thing that would make linking faster. I remember back a couple years when a coworker was using an SGI O2 machine to build our of our products. That machine had like 128 megs and linking took forever! Doubling the ram sped up compiling and linking immensly. > What are other people doing to reduce their compile times? Getting rid > of STL is not really an option. It's way too useful to replace it with a > crippled, custom container/algorithm set that is probably not even type > safe. But any tricks that reduce how many times the same templates get > evaluated to save time would be welcome. For windows, I think making sure you have automatic use of precompiled headers on and incremental linking on. I wish gcc had those. There's this one file we have that takes literally 5 minutes to compile on the mac, and about 5 seconds on vc++. It uses stl::list a lot. - Ray |