After upgrading from VS2013 to VS2015, I was shocked by how slow my web application runs with the debugger attached. So I decided to do a comparison between VS2013 and VS2015 using MiniProfiler to analyze a particularly slow page:
Interestingly, when debugging using VS2013, the page loads faster under IIS then IIS Express. But when debugging in VS2015, IIS is way slower then IIS Express.
Also, MiniProfiler is indicating that a high proportion of the time is used in SQL-related code. So I tried using dotTrace to profile the page on IIS - once with the VS2015 debugger attached, and once without it attached:
It appears that when debugging in VS2015, a very high percentage of CPU time (real time) is spent on SqlCommand.ExecuteReader() whereas with the debugger not attached, that method is pretty efficient.
I've also tested this on another computer with the same results.
My application uses ASP.NET MVC, NHibernate, SQL Server 2014, and I'm using IIS 10
Has anybody else experienced slow application performance with the VS2015 debugger attached, particularly when running SQL commands? Any ideas what the root cause is and how to solve it?
Could be the IntelliTrace, try this https://msdn.microsoft.com/en-us/library/dd264948(v=vs.100).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With