Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Aug 04, 2016 @ 14:40
    Jeroen Breuer
    0

    TraceDuration and performance measurement

    I'm having some performance issues and I'm having trouble to find the problem. With the following it's really easy to find out how long a specific piece of code runs:

    using (this.UmbracoContext.Application.ProfilingLogger.TraceDuration<YourClass>("Start action", "Completed action"))
    {
        // Your code.
    }
    

    Are there specific events which might be good to add this code? For example in PreRequestHandlerExecute. Any other suggestions?

    Jeroen

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Aug 04, 2016 @ 14:44
    Shannon Deminick
    101

    Use Mini Profiler, put ?umbDebug=true on your requests when in debug mode so you can see where in the request it is slow it will profile all of your views automatically.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Aug 04, 2016 @ 15:08
    Jeroen Breuer
    0

    Great idea! Somehow it's only slow on our QA environment and debug was disabled there. For now enabled it to see what's going on.

    Jeoren

Please Sign in or register to post replies

Write your reply to:

Draft