Visual Studio Note Application

This is kind of a vague question, but is there anything I can do to make visual studio slow down the application? If I run executables outside of the visual studio, it works at a very reasonable speed. If I run it in visual studio with the debugger turned on, it will work almost 200x slower. I tried uninstalling and reinstalling the visual studio to no avail. I removed all my plugins (ants and resharper) and still nothing. I started the project in a visual studio on another computer, and the speed was normal. What can I do to solve this problem? It seems to have happened recently, but perhaps gradually.

Update: I ran it now in other visual studios, and slowdown is supported. My only conclusion is that assigning memory to the speeds that I have in the application leads to the fact that the debugger somehow slows down the work. Does anyone have any experience with this?

+2
source share
5 answers

Exceptions are very expensive when running in the debugger and can slow down the application if many are thrown and caught. Look at the Visual Studio output window, where you can see the thrown exceptions.

+4
source

Are you deleting characters from the character server? This is a common cause of slowdown.

Check _NT_SYMBOL_PATH if it is installed, or your debugging options when using VS 2008 +

+3
source

In general, the Visual Studio debugger does not slow down. This should be something specific to your application.

For example, there is a recent SO question from someone who gets an OutOfMemoryException when debugging, but not when running outside the debugger. This seems to be due to the way it allocates memory - the method is sensitive to the number of assemblies loaded into memory. Most programs will not be sensitive to this passive debugger effect. You may also suffer from some kind of effect related to the debugger, but not the full "debug" debugger.


Mitch Wheat suggested that you might have an antivirus. This reminded me of a similar piece of software that took over to pay attention to building and unloading the Visual Studio assembly. It was part of the VPN software providing endpoint security. It was intended to verify which programs you started when connecting to the VPN, and to make sure that they comply with the security policy. This meant informing each loaded assembly.

Visual Studio loads and unloads many assemblies. This VPN software was so interested in the fact that it actually caused BSOD - the only time I saw an application that called BSOD was because it installed a file system filter or some of them and was notified in kernel mode. This was enough to put the system in order.

So, in general, find some kind of software product that takes care of what works on your computer. Maybe endpoint protection, maybe an antivirus, maybe a search index, or something else.

+2
source

The problem is that Windows throws a special Debug heap if it detects that your program is running under a debugger. This seems to be happening at the OS level and is independent of the Debug / Release mode settings for your compilation.

You can get around this "function" by setting the environment variable: _NO_DEBUG_HEAP = 1

The same problem turned me on for a while; Today I found the following where this post came from: http://blogs.msdn.com/b/larryosterman/archive/2008/09/03/anatomy-of-a-heisenbug.aspx

+2
source

The VS debugger adds additional commands to your code to enable all the functionality it brings. A flaw can slow down your application.

Perhaps that is why your application works fine when you run the executable on another computer.

Then this is a problem that should not bother you, because the release version of the application matters - who cares about the performance of the debug version if the latter works well.

0
source

Source: https://habr.com/ru/post/1334525/


All Articles