Page load speed is an essential factor in any business web delivery plan. If a web page takes too long to load, site visitors will simply jump ship and go somewhere else. Episerver comes with a few basic in-built tools that can help you refine your page load times, but, in my opinion, if you are really serious about performance you will need to use third-party tools specifically targeted towards performance. One tool I would recommend looking into is MiniProfiler.

How To Install Mini Profiler In Episerver

Mini profiler can be installed via NuGet, in Visual Studio open your package explorer by right-clicking on your solution and selecting 'Manage NuGet Packages'.


Type in 'Mini Profiler' and click install. Configuring Mini Profiler from here is pretty easy. Add the following code into your Global.ascx.

Add this into your web.config:

In your master layout, you will need to add this snippet of code:

Now when you try and run your website...

episerver_mini_profiler_4 In the top left, you should see the mini=profiler tab available.

How To Measure Your Code

There are various ways you can architecture your performance monitoring code into the solution. I would advise trying to follow the open/close principle and mix and match your monitoring and production code. When you architect your solution, if you use an IoC like structure map, you can keep this code separate. For the code you want to profile, you can use this code: