Locked Do not use in-source suppressions on release builds

  • Tuesday, January 31, 2012 11:19 AM
     
     

    Hi,

    In the next suppression overview, Microsoft mentioned that using in-source suppressions on release builds will cause to performence degradation.

    http://msdn.microsoft.com/en-us/library/ms244717.aspx

    How critical (Performance wise) it is? Would you say that it is just the same as having Avoid uncalled private code (CA1811)?

    Thanks

    Yaron Cohen

All Replies

  • Wednesday, February 01, 2012 5:21 AM
    Moderator
     
     Answered

    This is the reason in the very first paragraph in that document:

    In-source suppression is the ability to suppress or ignore Code Analysis violations in managed code by adding the SuppressMessage attribute to the code segments that cause the violations. The SuppressMessage attribute is a conditional attribute which is included in the IL metadata of your managed code assembly only if the CODE_ANALYSIS compilation symbol is defined at compile time.

    It will cause the violations. It will caused the IL metadata increase before you not used it.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
  • Wednesday, February 01, 2012 3:18 PM
     
     

    Hi,

    What kind of performance degradation is expected due to the increase of IL metadata? will it only impact the load of the assembly or is there an impact in runtime (after the assembly is loaded)?

    Thanks,

    Nir

  • Thursday, February 02, 2012 11:53 AM
     
     

    Joining to Nir,

    Can I say that the impact on the performance will be similar to the performance degradation of having uncalled private code (CA1811)? Otherwise, is it more or less critial?

    Thanks

    Yaron Cohen

  • Friday, February 03, 2012 5:12 AM
    Moderator
     
     Answered

    I think so, based on my knowledge, they all increase the file size, then the Process Working Set will be increasing.

    They will be effect the program runtime performance according to the Process Working Set concept, once the application file size increase to a bigger number. This part is the low level affect.

    But for common application/product performance, I think this affect can be ignored.

     


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us