The Design-Time Developer

Follow-up to 2/10 IndyNDA Presentation

First, a blast from the past: remember those Rold Gold pretzels about which I waxed poetic when I discovered that they maintained their crunch 2 months later.  Well, I had a 3 hour drive to Indianapolis this afternoon for the UG presentation and I saw them once again in the cabinet.  Not having much else snackable to take with me, I shrugged, grabbed the bag and started on my way.

[Temporary jump off-topic] My bedroom growing up was in the basement of a ranch house in DeWitt, NY.  It was a finished basement and relatively clean, but potato bugs did have a habit of coming in from the cold for the winter.  There was also this "basement smell" - not quite musty, but not quite fresh either.

[Back to the pretzel story] When I took the first handful of preztels, everything seemed fine.  Another 5 months of compounded aging had very little effect on these pretzels.  As I continued to consume the pretzels, I suddenly had thoughts of my childhood.  I didn't immediately understand why, until I noticed that the aftertaste from the pretzels was now the very same "basement smell" I had grown up with.  Needless to say, I still finished all of the pretzels - despite the somewhat unpleasant aftertaste, they *did* still keep their crunch quite well.

In a couple hours I had made it to Indy, but not after passing a truck with the traditional "We hire safe drivers - call 800-XXX-XXXX for comments" with the entire latter portion painted over.  One would think that this driver was either a) not a very accurate painter or possibly b) not, in fact, a very safe driver.  I was somewhat nervous being in his vicinity, so I gunned my engine and sped past him.

I was presenting my "Need For Speed - Windows Forms Performance Tuning" session (available as an on-demand webcast) and the UG members became very animated and interactive, asking lots of questions and discussing different approaches to testing and optimizing performance.  I got to see some folks who had previously attended my MSDN Events in the area and invited everyone else to my upcoming event in March.  As promised, I have included links to additional information below, including the code we discussed in the session (available within the 2 articles).

This session was adapted from

How To: Use CLR Profiler
How To: Time Managed Code Using QueryPerformanceCounter and QueryPerformanceFrequency

Both of these articles are part of the 'patterns and practices' guide: Improving .NET Application Performance

I want to take a moment to thank Brad Jones for inviting me to present, the entire IndyNDA board for putting together such a cohesive user group, and all of the folks who came to my session tonight.  I had a great time and hope to present again for you all soon!

Happy Coding,
Jacob

PS On the way back, due to my unforeseen pretzel shortage, when I stopped for gas, I also picked up some of those delicious Twizzler Cherry Nibs.  You know the ones I'm talking about - the Twizzlers that look like factory rejects, but taste "oh, so delicious".

Published Thursday, February 10, 2005 11:28 PM by jacobcy

Comments

 

LesR said:

Good presentation, Jacob. The only trouble is that performance and optimization is such a broad topic that we really only scratched the surface in the hour (maybe 90 minutes) that we had.

At the point where the presentation covered instumentation, it would have been worthwhile to mention that profilers can add a significant overhead to your run times; because of this, instrumentation is sometimes the better than profiling.

Some of my colleauges were noticeably dishelved with the "use return codes instead of exceptions" recommendation. Without adequate explanation they thought you were making a blanket statement recommending to never use exceptions; which I believe couldn't be further from the truth. Use exceptions where they make sense; specifically, "reserve exceptions for exceptional situations." I'll go a bit further and suggest that we shouldn't use exceptions as part of the normal expected flow of our code. [I remember working with a colleague who was coding in java and was exception-happy; using her code was pain, you couldn't call any of her methods without a try/catch even if you knew you weren't violating the contract that the exception was designed to enforce.]

Interestingly, what parts of exception handling make it less performance oriented? There's obviously the memory allocation for the exception instance; there's overhead for the CLR in walking the stack to find exception handlers (i.e., catch blocks, finally code); but are there other snags? My colleagues made comments about "Don't use exceptions? Why not return to procedural code while we're at it?"

I enjoyed the presentation and learned a little about the available performance counters and using them to assess .NET performance.

- Les
February 11, 2005 10:33 AM
 

Jacob said:

Les,

Thank you for the feedback. I agree that 90 minutes is a very limited time to cover such a vast topic. I am in early development stages for a 5-part webcast series diving deeper into different aspects of performance - if/when it goes live, I'll mention it on my blog.

I wholeheartedly agree with you that exceptions should be reserved for exceptional situations. For lack of time, I sped through the exception management tip and now regret that I did not linger to explain more thoroughly. I also should have phrased it "Try not to throw exceptions" rather than "Do not use exceptions". Here is a link to the "Improving Managed Code Performance" chapter of the book linked above - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetchapt05.asp. There is a section on exception handling best practices that better explains how to deal with and use exceptions.

I'm glad that you enjoyed the session and I look forward to coming back again soon.
February 11, 2005 12:39 PM
 

Jeramey Jannene said:

I'm going to skip any technical comments because it's late, but those reject Twizzlers are great.
February 13, 2005 1:25 AM
 

The Design Time Developer Follow up to 2 10 IndyNDA Presentation | Outdoor Ceiling Fans said:

May 31, 2009 3:16 AM
 

The Design Time Developer Follow up to 2 10 IndyNDA Presentation | adirondack chairs said:

June 14, 2009 9:13 AM
 

The Design Time Developer Follow up to 2 10 IndyNDA Presentation | Outdoor Decor said:

June 19, 2009 12:44 AM
New Comments to this post are disabled

This Blog

Syndication

News

This is the blog of Jacob Cynamon, Microsoft developer community champion (DCC) for Illinois, Indiana, and Wisconsin.


All postings on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer.

Developer Events

Other Microsoft Events TechNet Briefings
[IT Pros]


Connections
[Small/Mid-Sized Business Owners]


TS2 Seminars
[MS Partners]


MBS
[Business Professionals]


Stay up-to-date on developer happenings
Localized MSDN Flash Newsletter

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker