plaisthos plaisthos - 1 year ago 78
C++ Question

Visual studio app running extremly slow with debug

I have a native c++ program which runs > 20 times slower when started with Debug (F5) but runs at normal speed when using start without debug (Ctrl+F5).

It does not matter whether I use a debug or release build. Also if I use Windbg the program is a magnitude slower.

Is there some setting I did choose wrong or something?

Answer Source

Set the _NO_DEBUG_HEAP environment variable to 1 (as seen on )

This can be done from inside Visual, too.

Now this is just a workaround, I'm curious to know how to refactor a program which suffers from this kind of problem. Do you have many std::map's, shared_ptr, or any other big indirections by any chance ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download