This item is about the perf regression we have seen when the debugger is attached. It was reported in several places, including bug #1749
, but that bug describes other issues
that need to be addressed separately.
The cause of the startup performance deterioration with the debugger attached is that our metadata collections use Lazy<T> in a way that triggers numerous invocations of Debugger.NotifyOfCrossThreadDependency() at model creation time. This call is very
expensive when there is a debugger attached.