Home Dashboard Directory Help
Search

Debugging MVC is very, very slow by Sean Hederman


Status: 

Closed
 as Fixed Help for as Fixed


3
1
Sign in
to vote
Type: Bug
ID: 535799
Opened: 2/23/2010 9:16:31 PM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

Takes up to 2 mins to start the web site created for ASP.NET MVC. Once VS has started debugging it's okay, but it takes this insane amount of time before it starts debugging.
Details
Sign in to post a comment.
Posted by howserss on 1/15/2014 at 5:47 AM
This is also happening on VS 2012 Pro which does not have intellitrace. The slowness seems to be related to Loading Symbols. At least that what it looks like on several machines.
VS 2012 Pro/Ultimate Windows 7 Enterprise 32 bit.
Pro and Ultimate (W/ intelitrace off) are having the same issues but it seems to get better after time on Ultimate for some of us.
Posted by Microsoft on 8/12/2010 at 1:59 PM
MVC debugging slowness due to intellitrace is a by design issue, since MVC uses exception for its code flow, which generates tons of exception during debug startup, which make intellitrace very slow.

The workaround is to turn off intellitrace like Joe said previously to gain performance.

If after turning off intellitrace, start debugging is still very slow, please do let us know by opening another connection bug.

For this one, I'm going to close it as by design.

Thank you very much.

Xinyang Qiu | Web Development Tools
Posted by Microsoft on 8/4/2010 at 4:16 PM
Can you try turning off intellitrace? Tools->Options->Intellitrace? We have seen issues with intellitrace and mvc debugging so turning off this option my speed up debugging mvc apps by a large amount.

Joe Cartano | Visual Web Developer
Posted by TwasBrillig on 6/2/2010 at 4:42 PM
I have a fairly small MVC application.
Controller [HttpGet]
ViewPage<person> (with MasterPage)
    EditorFor(model)
     ViewUserControl<person>
        EditorFor(person => person.FirstName)
        EditorFor(person => person.LastName)
        EditorFor(person => person.Phone)
        ...

Symptoms
- For each identical text box I add in this way, I add about 350ms to the page load time while in debug mode. My page takes about 5-7 seconds to load or refresh in its current design, but times are somewhat variable.
- If I disable debugging, with or without controls on the page, response is very fast, about 50ms.
- If I remove the controls from the page, the time drops to a fixed 200ms duration.
- CPU is 51% (dual-core) throughout the delay, and my laptop processor scales to 97% maximum frequency.

Contraindications:
- All of this is the initial GET, no posts or other activity involved.
- I've run SQL Profiler and found response times to be acceptable, the query is not repeated, and no unusual data activity is present.
- I've installed wireshark and do not see unusual resolution or other activity.

My environment
- I've recently upgraded from VS2010 RC2 to RTM.
- I'm running Windows 7, and my computer is fairly new with minimal applications.
- My model is a persistence-aware EF repository, referenced in another project, using Windows Integrated Security to connect to a SQL 2008 R2 database.



Here is an example:
<%: Html.EditorFor(model => model.IdealJobTitle)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.IdealJobTitle)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.UsdHourly)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.UsdSalary)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.IdealJobTitle)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.UserAccount.FirstName)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>
<%: Html.EditorFor(model => model.UserAccount.LastName)%>
<%= DateTime.UtcNow.Second * 1000 + DateTime.UtcNow.Millisecond %>

Generates:
<input class="text-box single-line" id="IdealJobTitle" name="IdealJobTitle" type="text" value="" />
6860
<input class="text-box single-line" id="IdealJobTitle" name="IdealJobTitle" type="text" value="" />
6860
<input class="text-box single-line" id="UsdHourly" name="UsdHourly" type="text" value="" />
7193
<input class="text-box single-line" id="UsdSalary" name="UsdSalary" type="text" value="" />
7520
<input class="text-box single-line" id="IdealJobTitle" name="IdealJobTitle" type="text" value="" />
7520
<input class="text-box single-line" id="UserAccount_FirstName" name="UserAccount.FirstName" type="text" value="MyFirstName" />
7520
<input class="text-box single-line" id="UserAccount_LastName" name="UserAccount.LastName" type="text" value="MyLastName" />
7520


Note that neither repeated access to the same expression or access to related entity properties caused degradation in my test.

Posted by Sean Hederman on 4/25/2010 at 12:44 AM
A default WAP took 15 minutes to stop after I pressed the Stop button!
Posted by Dennis123_abc on 3/10/2010 at 2:25 AM
Debugging MVC is very!

Visual Studio 2008 on windows 7

running Thebeerhouse MVC 1v startkit
click run-debugging Page takes 2-3 minutes to load.
Posted by Microsoft on 3/1/2010 at 4:52 PM
Hi Sean,
Can you also let us know if this only repros with MVC applications or with WAPs as well? Also, what is your OS and do you have any third party add-ins installed? Also, it would be helpful for us to understand what is going on if you could attach to vs while you are debugging and get a crash dump. You can e-mail me directly at joecar@microsoft.com as well.

Thanks.
Joe
Posted by Sean Hederman on 3/1/2010 at 6:50 AM
Sorry, been off email. Don't have the project here at work, will attach it in the next few hours.
Posted by Microsoft on 2/24/2010 at 2:42 AM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 3 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team
Posted by Microsoft on 2/24/2010 at 2:15 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly (http://support.microsoft.com/)
Sign in to post a workaround.