Advertisement

Slow Compilation

Started by November 21, 2000 07:26 AM
3 comments, last by Dark Star 24 years, 1 month ago
Hi everyone, I just wanted know something before I upgrade my computer. First of all I want to move out of the dark ages of using MS-DOS for making games and I want to move to Windows and Direct X because I have been doing a lot of reading on DirectX and find that it is not so hard after all (what originally put me off was all the long data structures, Microsoft’s way of variable naming e.g prefixing all variables with its type, etc, etc) But I have it admit there is no running away. I am currently practising my new found skills in Direct X using Microsoft Visual C++ Introductory edition because it came with Andre LeMothe’s Tricks of the Windows Game Programming Gurus book (I do intend on buying the proper one when I decide to make a full game to distribute). The problem is that the compiler compiles too slowly on my P166 16Mb computer and I wanted to know if it would benefit me to upgrade memory only instead of processor. Right now I am thinking about only upgrading memory because it is easy to do and I can by memory off the high street here, which is pretty damm cheap. I want to upgrade to 64Mb. Would the compiling speed up. Compiling a Visual C++ program made up of only 3 files: WinMain.cpp - Creates the window and looks after messages Game.cpp - Main game stuff DirectDraw.cpp – My source code to act as an easy interface between DirectX’s ugly functions and constants and to keep them away from my code Compiling just those 3 files which are not even that massive and don’t #include that much files takes (on a good day) about half a minute to sometimes a minute which is simply too slow for me to wait. If I make a small mistake in my code and have to change just one number in one line of the code, I have to wait almost a minute to a minute for an exexutable to made and run and if I have to move to the Windows platform I will need to make sure that it can compile fast. When I used DJGPP C++ in DOS I made a game that has 13 large C++ files and when I clicked on the option to re-compile and build all 13 files it did it in about 12 seconds which was not bad waiting for considering it was 13 large files of code that #included tonnes of Header files and stuff. So now that u all know how slow it takes to compile in Windows (only 3 files) on my computer, could anyone tell me if it is worth upgrading just memory. If I upgraded to 64MB from 16 would I notice a speed difference in compilation still with the P166 processor? Help !! I am really stuck, and I wanna make cool Windows games too. I only want opinions please. But any help is good help Dark Star UK
---------------------------------------------You Only Live Once - Don't be afriad to take chances.
If compilation speed is really an issue to you, you''re probably using the wrong programming language. Personally, I think all the C++ compilers I''ve used so far were painfully slow. However, a full minute to compile three source files is beyond slow, so I agree: you should upgrade

In my experience, the VC++ compiler speeds up nicely with your CPU. However, if you have only 16 Mb of RAM, I can imagine it''ll be grinding your swap file more than it''ll be hogging your CPU.

Upgrading to 64 Mb should help, but remember that if you later decide to buy a new CPU, you''ll probably have bought that extra memory for nothing. If you buy a new CPU, you''ll need a new motherboard, a new casing and (I think) new RAM. So either way, you''re boned
Tom Nuydens delphi3d@gamedeveloper.org www.gamedeveloper.org/delphi3d
Advertisement
You can try a few things to help you out (maybe). They have provided substantial increases in my compilation times for debug recompiles.


1) Remove the program database from the debug info on your project->settings-> C/C++ -> General Category. Change Debug Info to maybe line numbers or something else. I know it takes forever to create that program database on my 233mhz machine.

2) Turn on Incremental linking (debug mode only suggestion). project->settings->Link->Incremental Linking.

3) Enable Incremental Compilation (again, debug mode only suggestion). project->settings->C/C++->Custom category.

4) Enable Precompiled Headers. I personally don''t do this, but hey, to each their own...

The reason I suggest "debug mode only" is a personal preference. If I am creating a release Build, I want to take the time to make sure the whole thing is built right...

Regards,
Jumpster
Regards,JumpsterSemper Fi
Also, you can temporarily turn off your virus protection.
That can dramatically slow down a compile.

precompiled headers give you a huge gain in compiling time!

Buy a new board, CPU, & ram man, that stuff is old! you can pick up a new cpu, a board, & 64MB ram for ~$200

course you''re going to want a bigger-faster HD the second you turn it on!
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement