locked
Release ? RRS feed

  • Question

  • Is there any point (speed advantage?) in making Release solutions instead of default Debug in C# SharePoint solutions?
    Monday, January 23, 2012 10:29 AM

Answers

  • Release Mode
    When an assembly is built in release mode, the compiler performs all available optimisations to ensure that the outputted executables and libraries execute as efficiently as possible. This mode should be used for completed and tested software that is to be released to end-users. The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.
    Debug Mode
    Debug mode is used while developing software. When an assembly is compiled in debug mode, additional symbolic information is embedded and the code is not optimised. This means that the output of the compiler is generally larger, slower and less efficient.
    I can’t really comment on the performance aspect as running with debug assemblies is a little heavier on performance, as they take up more memory, but usually not extremely so.
    Hope this helps!!

    My SharePoint Blog
    http://www.dhirendrayadav.com
    • Proposed as answer by Horizon_Net Monday, January 23, 2012 10:56 AM
    • Marked as answer by e v e r n i t e Monday, January 23, 2012 12:37 PM
    Monday, January 23, 2012 10:50 AM

All replies

  • Release Mode
    When an assembly is built in release mode, the compiler performs all available optimisations to ensure that the outputted executables and libraries execute as efficiently as possible. This mode should be used for completed and tested software that is to be released to end-users. The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.
    Debug Mode
    Debug mode is used while developing software. When an assembly is compiled in debug mode, additional symbolic information is embedded and the code is not optimised. This means that the output of the compiler is generally larger, slower and less efficient.
    I can’t really comment on the performance aspect as running with debug assemblies is a little heavier on performance, as they take up more memory, but usually not extremely so.
    Hope this helps!!

    My SharePoint Blog
    http://www.dhirendrayadav.com
    • Proposed as answer by Horizon_Net Monday, January 23, 2012 10:56 AM
    • Marked as answer by e v e r n i t e Monday, January 23, 2012 12:37 PM
    Monday, January 23, 2012 10:50 AM
  • > The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.

    I never faced this basic drawback in my experience. Debugging in Release mode works as well as in Debug mode.

    Monday, January 23, 2012 12:41 PM
  • > The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.

    I never faced this basic drawback in my experience. Debugging in Release mode works as well as in Debug mode.

    Debug an release are just two names of compilation settings.  You can change the settings for either.  You can turn off optimization for your 'release' build and turn on debugging information.  Likewise you can turn off debugging information and turn on optimization for your 'debug' build. 

    Additionally I've found that SharePoint sites tend to not do a whole lot of CPU processing.  Any 'work' that takes a long time is usually related to communication with the content database, not in actual processing, and that is rarely affected by the compile mode of the program.

    Monday, January 23, 2012 3:20 PM