I\'ve got a strange problem; normally when you set debug=false
in your web.config file and compile your web application in Release mode, it increases performanc
Short answer: the problem was Microsoft.AspNet.Web.Optimization
beta2; it is doing something extremely inefficient and will add a second onto your page rendering time. If you're using it, upgrade. Now.
I took Steven's advice and used MiniProfiler to see what was causing the slowdown in the view. It was the System.Web.Optimization.Scripts.Render()
rendering of the jQuery UI JS:
As per the advice of this question (also, this question seems to address the issue), I upgraded:
PM> Update-Package Microsoft.AspNet.Web.Optimization
Updating 'Microsoft.AspNet.Web.Optimization' from version '1.0.0-beta2' to '1.0.0' in project 'Bacp.Assess.Web'.
This upgrades both Microsoft.AspNet.Web.Optimization
and WebGrease
. Here's the same page after I upgraded:
Uhm. :-) I just knocked 99.9% off the rendering time of the page. Other pages on my site are rendering a lot quicker too. I don't know what Microsoft.AspNet.Web.Optimization
beta2 was doing but it's like a ball and chain around ASP.NET!