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?
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.
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:
Are there specific events which might be good to add this code? For example in PreRequestHandlerExecute. Any other suggestions?
Jeroen
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.
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
is working on a reply...