Just a followup to jr76's comments.
The BCL bug may not be the root cause; the ticket on Microsoft Connect identifies the check for type naming conflicts as the source of the slow down. The stack trace for the name check appears to be:
System.Reflection.Emit.AssemblyBuilderData.CheckNameConflict()
System.Reflection.Emit.TypeBuilder.Init()
System.Reflection.Emit.TypeBuilder.ctor()
System.Reflection.Emit.ModuleBuilder.DefineTypeNoLock()
Castle.DynamicProxy.Generators.Emitters.ClassEmitter.CreateTypeBuilder()
Castle.DynamicProxy.Generators.Emiitters.ClassEmitter.ctor()
Castle.DynamicProxy.Generators.ClassProxyGenerator.BuildClassEmitter()
Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode()
Our DotTrace investigation doesn't indicate that there is anything wrong during this construction of the ClassEmitter, so the type name conflict checking doesn't appear to have much of an impact.
All slowdown is observed further in ClassProxyGenerator.GenerateCode() when BuildType() is called on the ClassEmitter. BuildType() ultimately makes a call to: System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
CreateTypeNoLock is the method our trace is implicating as the hog.
Whether or not this is helpful remains to be seen :) The microsoft connect ticket may have misidentified the cause to the defect, or perhaps DP is encountering a different defect (one that may not be so out of "our" control), or I may be placing too much faith in Reflector's ability to illuminate what's going on. It at least hopefully warrants a little further investigation.
Rob.