we have noticed drastic (factor 3) performance losses in native C++ code since updating from VS 2003 to 2005. We are pretty certain that COM calls are the issue, as we have profiled the code. We observe this unfortunate change both with COM dll's written in C++/ATL and in C# /COM interop; both included in the native C++ project via #import.
One change in VS behavior we noticed are how .tlh and .tli files are autogenerated. To get the 2003 default behavior, we now have to use the raw_dispinterfaces attribute on #import. That doesn't help with performance, though. We have tried some other performance hints posted in this forum (low fragmentation heap), but to no avail. Finally, changing compiler settings related to optimization didn't help either.
Using the profiler, we also observed that more than 60% of all time was spend in System.Reflection.Invoke. We can't trace these calls completely, but presume they originate from the C# interop COM objects. As our own code does not use reflection, we don't understand this observation.
I cannot include all code here (too long), but any help would be much appreciated!