Reflection performance decrease after applying MS12-074 (with KB2729449) RRS feed

  • Question

  • Hi!

    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. 

    Image below shows time to scan through a set of DLLs with reflection. (time is in milliseconds).

    On 20/01/2013 the MS12-074 was installed on our servers.

    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):

                        assembly = Assembly.LoadFile(args[1]);
                        foreach (AssemblyName r in assembly.GetReferencedAssemblies())
                            if (r.Name.Equals("Some.Assembly"))
                                Selected = 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.

    • Edited by Igor Malin Tuesday, January 29, 2013 9:28 AM add img description
    • Moved by Mike FengModerator Wednesday, January 30, 2013 10:45 AM
    Tuesday, January 29, 2013 8:54 AM

All replies

  • Hi there,

    I am trying to involve some other one into this case, it will take some times, wait it patiently, please.

    Thank you.

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 30, 2013 10:46 AM
  • Dear Customer,


    Your question falls into the paid support category which requires a more in-depth level of support. Please visit the below link to see the various paid support options that are available to better meet your needs.;en-us;offerprophone   

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Eric Yang
    Microsoft Online Community Support

    Thursday, February 14, 2013 2:55 AM