c++ - Why is "Start Debugging" so much slower than "attach to process" in VC2010? -


i have program holds sveral mb (up gb) in hash tables (boost::unordered_map / unordered_set) etc. when use "start debugging" in vc2010, freeing such table may take incredibly long (several minutes), have terminate process. if start same binary without debugging freeing done in fraction of second. in both cases use same optimized release x64 build.

i read 2 existing questions topic:

but dont answer question: done more when start debugging, , there way turn off? need detection of access violations , possibility set breakpoints etc. being unable pass through deallocations etc. real problem. using "start without debugging" , later attaching process not making things easier.

when start program running windows debug heap enabled. nice, adds lots of pointer checking automatically invoke break when heap corrupted or release bad pointer. adds overhead indeed can slow down code when debug huge datasets.

the pragmatic solution avoid debugging jiggabyte datasets. or can set environment variable disables debugging heap. project + properties, debugging, environment, add _no_debug_heap=1


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -