Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Is "Try Catch" slow?
Previous Previous
 
Next Next
New Post 6/20/2008 2:34 AM
Resolved
User is offline FreeDotNetNuke
153 posts
freedotnetnuke.com
9th Ranked


Is "Try Catch" slow? 

Dear Colleagues!

Did anyone measure speed with using of "Try Catch"? Is it slow? if yes, then how much slow? 10%,50%, 100% more?

Reason of question: we develop httpModule and adding "Try Catch" makes process of load more slowly.

Thanks in advance!

Sergey


Client always right!
Pages Administration with Drag&Drop for DotNetNuke
List Of All Modules From FreeDotNetNuke
 
New Post 6/20/2008 4:12 PM
User is offline cathal connolly
2541 posts
www.cathal.co.uk
5th Ranked










Re: Is "Try Catch" slow? 

try catch is actually very fast, as it's catching the exception locally, and the only real effort is serialising the error message. See http://www.codeproject.com/KB/exception/ExceptionPerformance.aspx for some real statistics. I'm not sure why try catch is making your app run slowly, are you using a finally block or implmenting IDisposable, perhaps some clean up code in either of those areas is causing your performance issues.

Cathal

 
New Post 6/20/2008 5:12 PM
User is offline FreeDotNetNuke
153 posts
freedotnetnuke.com
9th Ranked


Re: Is "Try Catch" slow? 

Cathal

Thank you for your comment and link. We have added special code allows to measure time for each line and here is some results:

1) Simple "Try Catch" does not make code slowly. Exactly the same as without.

2) 2 blocks of "Try Catch" one inside other make code slowly for 8-10% :(

We sure that #2 is not good style of development. We will try to make code fully without of "Try Catch" and will replace them with correct conditions.

Again thank you for your comment. We will post additional info as soon will have it.

Sergey


Client always right!
Pages Administration with Drag&Drop for DotNetNuke
List Of All Modules From FreeDotNetNuke
 
New Post 6/20/2008 6:05 PM
User is offline Brandon Haynes
543 posts
everysport.net
8th Ranked


Re: Is "Try Catch" slow? 

I do recall some debate back in 2005 on this very topic, and there being some general disagreement in the community about the speed acceptability.  One bookmark that still works is at http://www.codinghorror.com/blog/archives/000358.html, which provides some additional data on the topic.  I suspect that this area has had some subsequent serious development, and throw performance nowadays is quite fine (at least IMO).

One point not yet raised, however, is that exception performance is generally pretty horrible under a debug build and in an IDE environment (at least it was in vs2005). 

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 6/21/2008 4:28 AM
User is offline FreeDotNetNuke
153 posts
freedotnetnuke.com
9th Ranked


Re: Is "Try Catch" slow? 

Brandon

Thank you very much for this so interesting information. We will research it. Also we are in researhc mode and it looks like question is really interesting and complex. In generally one idea: better do not use Try Catch at all, but build correct code (hmm not sure it is possible, but will try) OR to use ONLY ONE Try Catch at PageLoad. We will post additional information.

Sergey


Client always right!
Pages Administration with Drag&Drop for DotNetNuke
List Of All Modules From FreeDotNetNuke
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Is "Try Catch" slow?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN SEO
Seablick Consulting specializes in DNN search engine optimization (SEO), DNN consulting, as well as support & training.
seablick.com
Intura Vision / Intura Enterprise
Point-of-Sale and business management applications targeted towards quick service, fast casual and delivery-based restaurant concepts.
www.intura.com
Dnaxp.Net
Dnaxp.Net offers a comprehensive base of information, resources, and support for DotNetNuke.
www.dnaxp.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP