{"id":153,"date":"2007-03-21T15:32:42","date_gmt":"2007-03-21T20:32:42","guid":{"rendered":"http:\/\/bitpost.com\/news\/2007\/03\/21\/visual-studio-2005-performance-explorer\/"},"modified":"2007-09-16T12:59:28","modified_gmt":"2007-09-16T17:59:28","slug":"visual-studio-2005-performance-explorer","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2007\/visual-studio-2005-performance-explorer\/","title":{"rendered":"Visual Studio 2005 Performance Explorer"},"content":{"rendered":"<p>From the  &#8220;hard drive killer&#8221; department&#8230;<\/p>\n<p>I was pretty excited to see that VS2005 has an embedded profiler &#8211; Micro$oft had to come up with a new name of course &#8211; &#8220;performance analyzer&#8221;.  I threw HangTheDJ at it, going with all the defaults, and was served up with this gem before HangTheDJ even finished loading  (as I happened to only have <strong>8GB<\/strong> free at the time):<\/p>\n<pre><code>Performance automation returned the following error: : Error VSP1369 : Out of disk space: this scenario requires roughly 63073172 KB of disk space.<\/code><\/pre>\n<p>Yes, that says <strong>63GB<\/strong>.  Oh, to have the box of a Micro$oft developer&#8230;<br \/>\n<!--more--><\/p>\n<p>And after running it on a box with more space, I get a <strong>45G<\/strong>B &#8220;vsp&#8221; file, which when I try to open in Visual Studio, generates this:<\/p>\n<div class=code>\nError VSP1748 : VSP file is too large for analysis\n<\/div>\n<p>So, I followed the hint given along the way, namely &#8220;You may want to try analyzing it using vsperfreport.exe.&#8221;  OK.  I figured out where that tool was located (&#8230;Program Files\\Microsoft Visual Studio 8\\Team Tools\\Performance Tools) and tried that approach:<\/p>\n<div class=code>\nError VSP1748 : VSP file is too large for analysis\n<\/div>\n<p>Fool me once&#8230; oh well, sigh.  What fun.  I did manage to get a little information out of the partial file created when it ran out of disk space.  My HangTheDJ progress bar was redrawing itself every time I updated the &#8220;position&#8221; of the progress.  I updated the code to only redraw when the pixel math indicated that there would be an actual change to the display.  Cool.<\/p>\n<p>I guess the only reasonable step left with this thing is to figure out the options to only instrument targeted areas of the code.  What a shame.  To be continued&#8230;<\/p>\n<p>OK, after a little reading (doh), it sounds like I should&#8230;<\/p>\n<ul>\n<li>always use a release build (but with debug symbols added, of course)<\/li>\n<li>start with sampling<\/li>\n<li>proceed with instrumented profiling only after finding problem areas with sampling<\/li>\n<\/ul>\n<p>So I cloned the Release config, naming it Profiler.  I had to change all the targets to use the &#8220;Profiler&#8221; subdirectory (doh).  Then I added profiling and debugging information to the code generation and linker sections of the configuration.  Rebuild all, start a &#8220;sampling&#8221; profiler run.<\/p>\n<p>It&#8217;s showing that my database reads are taking the biggest hit, which makes sense.  Sounds like time to revisit that <a href=\"http:\/\/bitpost.com\/news\/2007\/03\/01\/whats-best-adonet-vs-ado-vs-access-vs-mysql-vs-oracle-vs-sql-server-vs\/\">Jet-to-sqlite <\/a>replacement&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From the &#8220;hard drive killer&#8221; department&#8230; I was pretty excited to see that VS2005 has an embedded profiler &#8211; Micro$oft had to come up with a new name of course &#8211; &#8220;performance analyzer&#8221;. I threw HangTheDJ at it, going with all the defaults, and was served up with this gem before HangTheDJ even finished loading [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[7,10,6,2],"tags":[],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-hangthedj","category-tricks-tips-tools","category-windows-projects","category-chatter"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-2t","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":0,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}