ASP.NET performance in debug mode

G

Guest

All the documentation says that leaving an ASP.NET application in debug
mode has a big performance hit. I can't detect any difference between
debug and non-debug modes. Am I missing something or is the
documentation wrong?


I've been load testing an ASP.NET website (built in VS.NET 2003 in C#).
I've used the ACT to generate heavy loads over several minutes. Debug
or no debug produces almost identical performance results.


To ensure I'm really in non-debug mode I have:
1) rebuilt the solution (for all my included C# DLLs) in "release"
mode.
2) changed to debug="false" in web.config.


Is there something else to turn off debugging and get lots more
performance from my site?
 
J

Jignesh Desai

Apart from enhancing protection and security, release mode also contributes
to the size-reduction of MSIL files
Extra NOP IL instructions are excluded.

Regards,
Jignesh Desai.
 
C

cic

Yes - I can see the non-debug offers some marginal inprovements i.e. a
couple of percent smaller DLLs and extra speed. However the
documantation says there is a big perfromance hit. Unless I'm missing
something the documentation is wrong.

This would mean that I can leave in the symbol tables so I get nice
code-bug messages. Also I can leave on debug mode to watch my live
servers - all without any significant performance hit. Both are very
useful thing to do.
As anyone else benchmarked debug mode vs. non debug mode?
 
S

Scott Allen

This biggest problem with debug mode is that pages do not timeout. If
for some reason a request gets into trouble and is just spinning and
waiting for a database query or webservice call to return, then
requests start to queue and rejected.

You can always build and deploy symbol files in release mode.
 
B

bruce barker

the performance gain of release mode vs debug mode depend on the performance
characteristics of the application. asp.net apps are usually very database
and string manipulation orientated. these will see little performance gain.
also in an asp.net app the amount of user code to framework code is usually
a small percent. however a numerial analaysis, or bitmap manipulation
application (loops with thousands of iterations) will see a greater gain.

-- bruce (sqlwork.com)


| All the documentation says that leaving an ASP.NET application in debug
| mode has a big performance hit. I can't detect any difference between
| debug and non-debug modes. Am I missing something or is the
| documentation wrong?
|
|
| I've been load testing an ASP.NET website (built in VS.NET 2003 in C#).
| I've used the ACT to generate heavy loads over several minutes. Debug
| or no debug produces almost identical performance results.
|
|
| To ensure I'm really in non-debug mode I have:
| 1) rebuilt the solution (for all my included C# DLLs) in "release"
| mode.
| 2) changed to debug="false" in web.config.
|
|
| Is there something else to turn off debugging and get lots more
| performance from my site?
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top