If a .pdb (program debug) file is included with a .dll then line numbers appear in the stack trace of any exception thrown. Does this affect the performance of the application?
This question is not about release vs. debug, i.e. optimisations. It is about the performance implications of having .pdb files. Are the .pdb files read every time an exception is thrown? Is the information cached in some way when the assemblies are loaded? Or is it cached the first time a relevant exception is thrown? How much difference does it make?
John Robbins wrote about this in his article Do PDB Files Affect Performance?. The simple answer is no (if you compile your release build with both the /optimize+ and /debug switches):
Additionally:
He also has another article entitled PDB Files: What Every Developer Must Know that is also a good read.