Loupe - Log - Monitor - Resolve
Loupe / Developer's Guide / For .NET Framework / Third Party Integration / Using PostSharp with Loupe / Third Party Integration - Using PostSharp with Loupe - FAQ
In This Topic
    Third Party Integration - Using PostSharp with Loupe - FAQ
    In This Topic

    Will integrating Loupe with PostSharp hurt my application's performance?

    The Loupe Agent for PostSharp is designed to use the best performing patterns for recording information into Loupe.  In general this will not affect your application's performance.  However, because PostSharp makes it very easy to broadly apply attributes (through multicasting) it is tempting to add an excessive amount of logging and tracking to your application.  If you do this the performance impact would be similar to if you had coded the same level of diagnostic recording yourself without the benefit of PostSharp. 

    For tips on how to avoid this problem, see Using PostSharp with Loupe - Best Practices.

    I'm logging method parameters and it's slow

    If you have objects that are passed to methods and override ToString to provide enhanced information, try setting the LogParameterDetails option to false.  This will let you log value parameters without paying the performance penalty of converting objects to a full string format, often resolving performance issues.

    Can I log directly to Loupe and use PostSharp at the same time?

    Absolutely.  The aspects included with Loupe are designed so you can configure them to integrate with your logging and metric strategy so that you can present the data in Loupe Desktop in the most effective way without concern for whether it was recorded directly by you or through the Loupe aspects. 

    Can I create my own PostSharp Aspects for Loupe?

    Absolutely.  Some of the aspects included with Loupe allow you to derive your own implementations to extend them.  Alternately, you can review the source code for the Loupe Agent for PostSharp and write your own but before going that far, check out if you can get the results you want by extending our aspects.

    What do I have to do to build my application with PostSharp?

    PostSharp integrates very easily with Visual Studio.  You just need to install PostSharp locally on each computer that will build your assemblies so that the core PostSharp assemblies are available and then when you reference the Loupe Agent for PostSharp (it will cause PostSharp to automatically be involved in the build process to post-process your assemblies to make the right connections between your code and Loupe.  You don't need to do anything to your build post-process or automated build system.  For more information see Third Party Integration - Using PostSharp with Loupe - Getting Started.

    See Also