none
Visual studio 2010 takes long time to run debug. RRS feed

  • Question

  • I have at small web-application that get some data from a SQLdb in Visual Studio 2010. When i try to display this, using a simple dropdownlist it takes around 15 sec the first time just after compilation and then after that 5 sec every request. I use a LINQ connection to db and a repeater to print everything out. It´s four columns and around 50 rows, so not so mutch data. It doesn´t matter if i try take 10 rows, same response time.

    We have tested the same thing on another computer with VS2008 installed and the time was like 0.1 sec or something like that. I use .NET 3.5 and have installed all the latest updates (SP1 and so).

    If i look at the trace i see it takes time at these rows in my code:

    var cust = dbContext.Customers
                                                             .Select(c => new
                                                             {
                                                                 c.customerID,
                                                                 c.Email
                                                             })
                                                             .Take(10);

                repeater.DataSource = cust;
                repeater.DataBind();

    Anybody know what could be taking som mutch time?

    Regards
    Daniel

    Friday, February 24, 2012 1:45 PM

Answers

  • In this case this had something to do with the settings in debug. 

    In debug-meny set that symbols should not load or if that doesn´t work go to tools - export/import and reset VS settings to default.

    Regards Daniel

    • Marked as answer by Daniel_Aren Thursday, March 14, 2013 9:05 AM
    Thursday, March 14, 2013 9:05 AM

All replies

  • Hi Daniel,

    Please try this thread: http://social.msdn.microsoft.com/Forums/en-US/vseditor/thread/a6d500a2-d4ea-43e2-8460-9283ea5c1d89 

    It seems that David Berg - MSFT can help much.

    When your problem solved, please don't remember to share here.

    Thank you.

    Best regards,


    Ghost,
    Call me ghost for short, Thanks
    To get the better anwser, it should be a better question.

    Sunday, March 11, 2012 5:02 AM
  • That sounds like DB connection problem (maybe some timeouts, etc.).

    Did you try to run it outside of VS?
    Try to connect profiler to the process and see what is taking the time. Or just attach debugger and see where you get the call stack in multiple runs.
    Also, are you sure the time is spent in the LINQ query? (Try to add logging before and after it to check).

    -Karel

    Tuesday, March 13, 2012 4:12 AM
    Moderator
  • In this case this had something to do with the settings in debug. 

    In debug-meny set that symbols should not load or if that doesn´t work go to tools - export/import and reset VS settings to default.

    Regards Daniel

    • Marked as answer by Daniel_Aren Thursday, March 14, 2013 9:05 AM
    Thursday, March 14, 2013 9:05 AM