Visual Studio 2008 Performance Profiling

I’m currently experiencing performance problem with a data fix, the process is taking hours which begs the question “why is that”?

I had experimented one time 2 years ago with the tool but hadn’t had a true need for it.

Steps Performed.

  • I launched the Wizard via Analyze, Launch Performance Wizard.
    • Left default Sample Option
    • Ran my app
    • Looked at report, Summary, Functions.  Couldn’t tell much.  Too high level, maybe I just don’t know what I’m doing.image image
  • So I ran the Wizard again
    • Choose Instrumentation
    • Reran, looks like there is some more useful information but the addresses Hex not Asciiimage
    • Why am I seeing Hex addresses?  Why not function names?
    • I think I’ve found my problem which I believe is a Linq to Sql Query but that is just a educated guessimage
    • 0x2B0000D3 is a Problem I guees… please correct me if I’m wrong.  I don’t understand, what part of my code is executing?  I suspect it has something to do with

My Problem

I solved my problem by removing a part of my where clause on my DB query and performed it in memory.  The following was on Query but now is two and my problem went away, I wonder why?

//Get paymment for claim
var QueryClmPayItems = from C in HpDb.View_ClaimsPayItemCheckDetailsUnitStats
                       where C.CNUMBER.HasValue && C.CNUMBER.Value.Equals(ClaimNumberIn)

              // && C.CheckDate.HasValue && C.CheckDate.Value <= ValuationDateIn
             select C;

//filter on dates, sql workaround with where in statement above process was taking hours to run
var QueryClmPayItemsDateFiltered = from X in QueryClmPayItems
                                   where X.CheckDate.HasValue && X.CheckDate.Value <= ValuationDateIn
                                   select X;

Summary

So it kinda helped, there is probably more I need to learn about the tool but I suspect it has shortcoming using the latest and greatest languages features (Lambdas, Linq, etc) and technologies (Linq to Sql).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s