I have an ASP.NET Application I want to debug on localhost. When I run it without debugging, it runs very fast and smoothly, with about 3 seconds per page load. However, when I try to debug the app with Visual Studio and Chrome or Firefox, every page load takes about 20-30 or even 40 seconds to load, which is extremely slow. I have tried everything I found on the internet about these issues, yet none seems to help me out:
"Load all Symbols" from Microsoft Symbol servers, then uncheck that location
Delete all breakpoints
Uncheck "Enable property evaluation"
Other options I can't recall
Which is a good debugging configuration for asp.net apps? Any extra suggestions that may help?
Thank you very much and kind regards,
David
It is possible that your visual studio is using a lot of memory. You should try to turn off the browserlink which will reduce the amount of memory being allocated. It is still fine to disable the browserling and the preview still works.
Here is a guide and explanation
http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx
It is also possible that you have a lot of data or calculation to be ran in your form load.
Another possibility is a slow internet connection, this only applies if you have items or scripts on your page the are from an external source like JavaScript, CSS etc.
Related
I am using Visual Studio 2010 with ASP.NET 4.0. If I need to run my project I have to press CTRL+F5 and then wait for the SQL Server to run, and then wait for the browser window to open. It really takes along time which is exhaustive especially when it is about debugging.
I understand that when modifying only the design page you can directly refresh your browser to see the changes, but when the modification is on the code behind I am obliged to press CTRL+F5 every time. Are there any other best practices to reduce this amount of time?
You have to recompile code every time you change the code. However, in case you have a solution with many projects, you can limit the projects to be recompiled from the Build Configuration Manager. This way you will reduce the time of the build process before your application runs.
If you have symbols turned on (in VS Tools | Options | Debugging | Symbols) this can add quite a bit of time to debugging builds. You may want to consider turning it off and only re-enabling it when you need to.
I have an Asp.Net 4.5 web application. Since we migrated to IE 11 we have the following
performance issue: Whenever I click on a button, the button stays selected for nearly
two seconds and then the request is executed. This does not happen with IE 10 or Firefox.
Is there any IE 11 specific configuration I have to consider?
I profiled the application with ants profiler, with Internet Explorer's developer tools
and Visual Studio debugger. I did not find anything special on java script side nor on server side.
We are using DevExpress controls and a little bit of jQuery.
I know that I am very general, but we have no idea, what the problem could be.
After removing all java script, jquery etc, the problem did not disappear.
So we investigated more into the page itself. The reason for performance problems
was an update panel we used. Adding the workaround from
http://support.microsoft.com/kb/2000262
fixed the problem immediately.
There is nothing in ASP.NET per se that would be causing your issues. There has to be something wrong in the JavaScript is my guess. It could either be your code or DevExpress code. Do a memory profile, take a snapshot. Are there any memory leaks? Run the script profiler see what is hogging the CPU, etc. If I were you I would focus on your code and see if anything there is the issue because you can control it. If you cant find anything there check the DevExpress forums, etc.
We have a reasonably large ASP.NET MVC app that I work on in Visual Studio 2012 on Win 8. I have a strange issue with slow page load times after recompilation. Usually, the actual build time is about 5 seconds, then the browser opens up and it takes 1-2 minutes to load the page.
Some points:
It loads slowly whether I change a view or recompile the project completely
This is not a performance issue, everything else works really well, there is enough RAM etc.
It happens only with IIS Express. When I switch to the default development server, it works fine.
All the other devs in my team use IIS Express, but they do not have this problem.
I tried to re-install IIS and to use v7.5 instead of v8 and recreated all config files. No luck.
I tried to disable all extensions, obviously it didn't affect load times too.
There is nothing abnormal in Task Manager
It's a virtual machine on my Macbook Pro, but again – this is not a performance problem.
What else can I try?
Solved by turning off Windows Defender Service. Everything is a hundred times faster now.
UPDATE: I failed to find a reason why Windows Defender is using lots of CPU power pretty much all the time. I tried to google it and it turns out that many people have a similar problem on Win 8 with no good solution.
If you really want to leave Defender on, you can add the project folder path as an exception, but it still will be slow-ish.
Hope it helps someone.
UPDATE 2: The above still holds true in Windows 10. Especially if you're running it in a virtual machine (I run it in Parallels on Mac). The overall speed increase, not only page refresh times, is very noticeable.
UPDATE 3: Apparently Windows Defender has a habit of silently turning itself back on again. So, be wary of that.
After viewing this question and answer above I found that Windows Defender Service was already turned off for me, however, I was running AVG. I disabled AVG and sure enough the lag went completely away!
So if Windows Defender Service is turned off for you and you are running some sort of system protection like AV try disabling that.
I have Visual Studio 2010 and a pretty large web application project running on IIS 7. Startup for the web application is over a minute (75 seconds). I've attached ANTS to it and very little of the 75 seconds is my code. Most of it seems to be something like CreateAppDomainWithHostingEnvironment and BuildManager stuff. Now I know that ASP .NET will compile dynamically the first time but I certainly don't expect it to compile for that long. Why could I be experiencing this problem and what are some ways I can try to fix it or try to better understand what is taking so much time. Aksi the CPU utilization doesn't seem to be that high. I have an awesome machine.
The problem with the 75 second startup is that for developers working on this, everytime they make a change they have to wait this 75 seconds.
I am using .NET 4.0
EDIT
I ran Microsoft Network Monitor on my machine to see if there was anything suspicious going on the network. There wasn't as far as I can tell though i wasn't sure what to look for (I am familiar with network monitor though so I did have an idea of what I was doing). I tried to run it in release build and though it may have improved the performance a little bit its not really significant
EDIT
I have SQL Session state. As far as i can tell, the connection string is pointing local. For some reasons though, when examinning ANTS, i'm getting a lot PollLockedSessionCallback on many threads. The function seems to be called over 70 times. Does this help at all?
Try building the application in release mode. You can set this in the Build tab of the properties window. You might also consider pre-compiling when publishing the application before deployment.
Are you trying to access anything via a network share at startup? If so, bring those resources local for startup comparison.
I am working on an ASP.NET 3.5 project which has 55 projects in a solution. When opening the solution in Visual Studio 2008, it takes over a minute to open - about 1 second for each project. However, if I disconnect the network cable before opening the solution, it only takes about 15 seconds! Any ideas about what could be causing the slowdown?
I had this happen to me back in the days when we were using Visual Source Safe.
Could be your source control plugin asking for updates if you have the solution under source control.
You should do some investigation, fire up Wireshark, start a capture on the interface in question and see what traffic is flowing over the wire.
Can I answer a question with a question? What is the secret to getting VS to not just die with that many projects, let alone load in a phenomenally quick 60 seconds?
At about 10-12 projects the compile time on Visual Studio becomes unbearable, at about 5-8 projects Resharper will crash. The IDE is such a memory pig that even opening more projects by using multiple instances of VS usually isn't an option.
Anyhow, it's all about memory usage and the odd ball out project is probably doing it, e.g. the one with the most files.
I had the same problem this week (5 years later!!). It was caused by a huge .suo file (almost 400 Mb), deleting it fixed the problem.
A few years ago I remember a colleague having some similar problem (with a lot smaller solution, and in VS2003). Can't remember the details, but I think it was related to the local ASPNET user account (or rather, that it did not exist). Not sure though...
As a side note: I usually find it more efficient to have perhaps around a handful of projects in each solution (usually one solution produces one or two assemblies used in production code), and then have a few Visual Studio instances running at the same time. 50+ projects in the same solutions feels like asking for problems.
Might be that you have other dependencies though, just wanted to share my thoughts.
which has 55 projects in a solution
WOW. I can't imagine what type of solution needs that many projects. The answer is probably that your source control provider needs to refresh the status of each of the items, all of which take time.
For edit-merge-commit style version control systems, such as subversion, this operation doesn't take place. Try temporarily removing source control from the entire solution to see if this is the culprit.
If your solution is attached to source control, then it is trying to load up the symbols and verify which items you have checked out. So, if you have a slow connection, it is oftentimes faster to take the solution offline.
http://www.tmgirvin.com/2009/03/working-offline-with-visual-studio-2008-and-tfs.html
EDIT
Another solution which I've seen used,
create a
_webTier.sln
_database.sln
_build.sln
( is your project name)
and each of those solutions is a self-sufficient part of the entire project, but that way if you are working on the webtier and you don't need the database project or the mobile project parts to load up, you can just open the webtier solution.
The build solution contains the entire package that needs to be built, and takes a very long time to load.
I had this problem on a development machine with no internet connection and it turned out that the problem was related to a setting in IE's internet options:
Control Panel -> Internet Options ->
Advanced -> Security -> Check for
publisher's certificate revocation
After making sure this was unchecked my solutions started loading quickly again.