Wednesday, April 14, 2010

Moving Blog (Again)

I don’t particularly like the idea of switching blog (again), however I’ve decided to join a few of my close colleagues (whom I respect a great deal) in a blog conglomeration of sorts. You can find my personal posts here:

http://sharpfellows.com/author/naeemkhedarun.aspx

And everyone’s posts here:

http://sharpfellows.com/

I did initially want to cross post but decided it was additional blogging overhead that I didn’t want, I’m lazy enough as it is :-)

If you are reading this, thanks a great deal for subscribing and I do hope you find the sharp fellows posts just as useful!

Nym.

Friday, March 26, 2010

Slower than Reflection: Take Two

This is a hugely belated reply to: http://kozmic.pl/archive/2008/10/13/slower-than-reflection-meet-stacktrace.aspx

I’m looking to perform some instrumentation on some already compiled code, and part of that involves getting a handle to a previous method. I wondered how slow accessing this through the StackTrace would actually be, and it turns out to be too slow according to that article.

I was hoping that Kozmic’s approach to getting the entire stack trace before filtering was causing the massive performance hit, so I did some benchmarks of my own…

Profile(() => new System.Diagnostics.StackTrace(false).GetFrame(1).GetMethod(), "Unfiltered StackFrame");

Profile(() => new StackFrame(1, false).GetMethod(), "Filtered StackFrame");

The unfiltered version is comparable to Kozmic’s example, and the filtered example is supposed to be more performant as we don’t need the entire stack trace. But the question is, “Is it faster?”. Let’s see:

image

(Results in milliseconds)

Yes it is!  However, quite unfortunately it is still not performant enough for my purposes. If you want to try out your own benchmarks the code is: http://bitbucket.org/naeem.khedarun/stacktrace.experiments/

Cross posted to: #Fellows

Wednesday, March 24, 2010

Session downloader for MIX 2010

I’ve rehashed the session downloader to be able to download the Mix 2010 sessions just gone by.

Thanks to Marcin Kaluza for helping out and giving the application some much needed design love.

image

As usual you can pick up the source at bitbucket: http://bitbucket.org/naeem.khedarun/fancypcddownloader2009/

And the download is now available via click-once: http://sharpfellows.com/SessionDownloader/publish.htm

Please let me know if you have any trouble with the application!

Cross posted to: #Fellows