Home Dashboard Directory Help

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


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 777744
Opened: 1/29/2013 1:46:41 AM
Access Restriction: Public
User(s) can reproduce this bug



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 (http://technet.microsoft.com/en-us/security/bulletin/ms12-074) 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, http://support.microsoft.com/kb/2729449 ) 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(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
reflection_performance.png 1/29/2013 73 KB
reflection_performance.png 1/29/2013 73 KB