ASP.NET Website DLL: Debugging Versus Version

When uploading my ASP.NET web application .dll file to my / bin / directory, are there any flaws in using the debug version and not for recompiling the release build.

For example, when working locally on a website, the assembly configuration is set to Debug. When everything looks good, I go ahead and download the latest .dll for the website / webapp. Should I instead instead switch the build configuration to release at that moment, then compile and then upload this version of the .dll to the server?

I hope this question is not duplicated. I read a number of other questions with similar words in the subject, but did not find what is directly related to my question.

Thanks,

Adam

+3
source share
5 answers

Working with debug assemblies is a little harder in performance, as they take up more memory, but this is usually not the case. You should only deploy the release build when it is truly a β€œrelease”. If you still expect some level of unexpected behavior in the wild, I would consider using assembly builds, so you will get more useful information from unhandled exceptions. The actual "gotcha" performance has debug="true" in your web.config.

+5
source

Much depends on your individual needs. In general, people are unhappy that debugging is done for performance reasons. The emitted debugging code is apparently not optimized and contains debugging symbols that can slow down code execution.

On the other hand, I worked with places where the policy was to create debug builds in production, because it makes it easier to view line numbers, etc., when the code throws exceptions. I do not say that I agree with this position, but I saw how people do it.

Scott Hanselman has a good position to create a hybrid version of Debug and Release, which could be the best of both worlds here .
+2
source

If you have a low volume site, you will never see a decrease in Debug build performance in any measurable way. If you have a high volume level, pay attention to other ways of registering / setting the code.

On a high-volume website, you need to do extensive stress and load testing to try very hard to break the application before it goes into production. I would do the first pass of this testing using Debug assemblies (since you are likely to break the material and it will make it easier to see where). Then repeat with Release assemblies to make sure they behave the same as Debug.

+2
source

Very few applications will see a significant performance difference between release and debug versions. If you are using a small to medium sized application and you think there might be any errors that you did not find, use the debug build.

+1
source

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


All Articles