Reputation: 2959
I got a program that has a quite simple 'load up' function that takes about 30 seconds (3M triangles that goes into std containers). It works perfectly well.
The rest doesn't always (it is not finished) so I debug a lot I make a lot of changes and so on which means restarting quite often.
Is there any secret technique to compile the loader in release (which speeds up everything enormously) and leaving the rest as debug?
ps. I use MSVC 2005
Upvotes: 0
Views: 440
Reputation: 67479
Debug builds tend to be very slow on Visual C++. There are a few reasons for this:
I've had success debugging apps that make heavy use of memory and STL using the following method:
Note that the above works great to debug problems in your own logic, but it may not be the best idea if you are debugging memory corruption or other problems, since you are eliminating all the extra debug code that the CRT provides for these types of issues.
I hope this helps!
Upvotes: 3
Reputation: 18954
Mixing debug and release builds tends to go horribly wrong.
But there's no reason why you shouldn't turn on optimisation for some selected source files even in a debug build - and the optimisation should give you the performance improvements.
Upvotes: 2