Reflection performance decrease after applying MS12-074 (with KB2729449) - by Igor Malin

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 777744 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/29/2013 1:46:41 AM
Access Restriction Public



We heavily use reflection to dynamic load 100+ assemblies in our C# .NET 4.0 application.

We also have a performance metrics set up to gather various aspects of our application performance.

During scheduled windows update procedure, an update related to  bulletin ( was applied to our servers.

Immediately we've seen a 2x decrease in performance for reflection and delay-loading DLLs.
Attached image shows reflection performance in milliseconds before and after the update was applied on 20/01/2013.

No other environment or code changes were made on those servers, so we assume that the performance impact was caused by applying KB2729449 (part of MS12-074bulletin, ) which includes (per MS description) some fixes in delayed DLL loading and reflection security aspects:

I would like to report our findings and clarify with appropriate .NET engineers whether this impact is known or expected.

Sample of code that can be used for reproducing this (should be set up to scan over 100+ assemblies):

                    // load assembly 
                    assembly = Assembly.LoadFile(args[1]);

                    foreach (AssemblyName r in assembly.GetReferencedAssemblies())
                        if (r.Name.Equals("Some.Assembly"))
                            testAssembly = true;
The question is not in the implementation itself, but regarding the sharp 2x performance decrease in delay-loading and reflection we've seen after applying aforementioned updates.
Sign in to post a comment.
Posted by Microsoft on 2/21/2013 at 7:25 AM
Thank you for your feedback. We are not going to be able to address this issue in our next release due to other priorities.

Immo Landwerth
.NET Framework team
Posted by Microsoft on 1/29/2013 at 9:40 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 1/29/2013 at 1:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(