Slow loading of symbols during call to CoCreateInstance in VS 2012

时间:2015-07-08 15:38:52

标签: visual-studio mfc visual-c++-2012

In my MFC project I call CoCreateInstance at some point:

if ( SUCCEEDED( CoCreateInstance ( CLSID_DragDropHelper, NULL,
                                   CLSCTX_INPROC_SERVER,
                                   IID_IDropTargetHelper,
                                  (void**) &m_piDropHelper ) ))
{
   ...
}

and a bit later once I'm done with the DragDropHelper I call Release:

m_piDropHelper->Release();

So far so good, everything works fine.

But during debug the very first call to this CoCreateInstance is painfully slow because VS is loading tons of symbols (this loading is visible in the VS Output window, see below). Subsequent calls to the same CoCreateInstance are fast. But when I restart de debugee, the first call to this CoCreateInstance is slow again.

I don't need these symbols for my purpose.

Is there a way to prevent Visual Studio from loading all these symbols.

Partial content of Output Window during debug

'MyProg.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Program Files (x86)\Common Files\TortoiseOverlays\TortoiseOverlays.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGitStub32.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGit32.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\libgit232_tgit.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\zlib132_tgit.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\msvcr120.dll', Symbols loaded.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Symbols loaded (source information stripped).
   <30 more similar lines>
'MyProg.exe': Unloaded 'C:\Program Files (x86)\Microsoft Office\Office14\GROOVEEX.DLL'
'MyProg.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\GROOVEEX.DLL', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.6161_none_51cd0a7abbe4e19b\ATL90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Cultures\OFFICE.ODF', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\1036\GrooveIntlResource.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\RpcRtRemote.dll', Symbols loaded (source information stripped).

1 个答案:

答案 0 :(得分:2)

您可以使用工具/选项/调试/符号来包含/排除符号。

enter image description here

“自动加载符号:”的两个选项应提供您想要的内容。