{"id":52,"date":"2011-08-23T01:11:44","date_gmt":"2011-08-23T05:11:44","guid":{"rendered":"http:\/\/blogs.visigo.com\/chriscoulson\/?p=52"},"modified":"2011-08-23T01:11:44","modified_gmt":"2011-08-23T05:11:44","slug":"performance-profiling-a-sharepoint-2010-project-using-eqatec-profiler","status":"publish","type":"post","link":"https:\/\/blogs.visigo.com\/chriscoulson\/performance-profiling-a-sharepoint-2010-project-using-eqatec-profiler\/","title":{"rendered":"Performance Profiling a SharePoint 2010 Project using EQATEC Profiler"},"content":{"rendered":"<p>I wanted to profile a SharePoint 2010 project i&#8217;d been working on, in order to find some of the slower methods so that they could be improved. \u00a0I decided to give <a title=\"EQATEC Profiler\" href=\"http:\/\/www.eqatec.com\/Profiler\/Home.aspx\">EQATEC Profiler<\/a> a try since it had some good recommendations on <a title=\"StackOverflow\" href=\"http:\/\/stackoverflow.com\/questions\/3927\/what-are-some-good-net-profilers\">StackOverflow<\/a> and was FREE.<\/p>\n<p>EQATEC works by modifying and rebuilding your assemblies. \u00a0Since I use Visual Studio 2010&#8217;s built in package and deployment features, it needs to be run after the build, but before the project is packaged and deployed to the SharePoint server.<\/p>\n<p>Here&#8217;s how I got it working:<\/p>\n<ol>\n<li>Start EQATEC Profiler. Under &#8216;Application to profile&#8217; select your project&#8217;s bin\\debug folder.\u00a0Check-mark\u00a0all of the assembly&#8217;s you would like to profile.<br \/>\n<a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECBuild.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-53\" title=\"EQATEC Build Page\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECBuild-500x387.png\" alt=\"\" width=\"500\" height=\"387\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECBuild-500x387.png 500w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECBuild-300x232.png 300w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECBuild.png 892w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/li>\n<li>Click &#8216;Build&#8217;. \u00a0This will rebuild the project with added profiling bits, as well as add &#8216;app.eqconfig&#8217; and &#8216;EQATEC.Profiler.RuntimeFullNet.dll&#8217; to your output folder.<\/li>\n<li>\u00a0The EQATEC assembly needs to be added to your project&#8217;s package for it to function properly.\n<ul>\n<li>Open your project in Visual Studio 2010.<\/li>\n<li>Open your project&#8217;s package and click on the &#8216;Advanced&#8217; tab.<\/li>\n<li>Click &#8216;Add&#8217; -&gt; &#8216;Add Existing Assembly&#8230;&#8217;. Browse and select &#8216;EQATEC.Profiler.RuntimeFullNet.dll&#8217; from your bin\\debug folder.<\/li>\n<li>You can leave the default location and selection of &#8216;Global Assembly Cache&#8217;.<\/li>\n<li>Click OK.<\/li>\n<li>Save the package.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-55\" title=\"Package Settings\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage1.png\" alt=\"\" width=\"454\" height=\"500\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage1.png 454w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage1-272x300.png 272w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><br \/>\n<\/a><br \/>\n<a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-59\" title=\"Package Settings File List\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage21-500x276.png\" alt=\"\" width=\"500\" height=\"276\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage21-500x276.png 500w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage21-300x165.png 300w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingPackage21.png 928w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/li>\n<li>Open the project properties and select the &#8216;Build Events&#8217; tab. \u00a0Add the following command to the Post-Build Commands:\n<pre>\"C:\\Program Files (x86)\\EQATEC\\EQATECProfiler\\EQATECProfilerCmd\" -build app.eqconfig<\/pre>\n<p>This will cause your assemblies to be recompiled with EQATEC once the standard build is done.<br \/>\n<a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingProperties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-58\" title=\"Project Properties Settings\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingProperties-500x273.png\" alt=\"\" width=\"500\" height=\"273\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingProperties-500x273.png 500w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingProperties-300x164.png 300w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingProperties.png 929w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/li>\n<li>Deploy your project to SharePoint.<\/li>\n<li>Exercise your project in SharePoint.<\/li>\n<li>In EQATEC, click on the Run tab. \u00a0You should see messages that your profiled application has started.<br \/>\n<a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECRun.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-54\" title=\"EQATEC Run Page\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECRun-500x387.png\" alt=\"\" width=\"500\" height=\"387\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECRun-500x387.png 500w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECRun-300x232.png 300w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECRun.png 892w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/li>\n<li>Once SharePoint has &#8220;warmed up&#8221; and your project is performing normally, click the &#8216;Reset Counters&#8217; button in EQATEC. \u00a0This will reset the profiling so that you can begin collecting data.<\/li>\n<li>Exercise your project in SharePoint. Make sure you exercise all code you&#8217;d like profiled.<\/li>\n<li>Back in EQATEC, click the &#8216;Take Snapshot&#8217; button. \u00a0This will create a report of your profiling session.<\/li>\n<li>Under &#8216;View snapshot reports&#8217; double-click on the report you&#8217;d like to view. \u00a0This will open the view tab, where you can explore the results of your profiling session and find the slower methods in your project.<br \/>\n<a href=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECView.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-57\" title=\"EQATEC View Page\" src=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECView-500x387.png\" alt=\"\" width=\"500\" height=\"387\" srcset=\"https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECView-500x387.png 500w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECView-300x232.png 300w, https:\/\/blogs.visigo.com\/chriscoulson\/wp-content\/uploads\/2011\/08\/ProfilingEQATECView.png 892w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/li>\n<li>Don&#8217;t forget when you&#8217;re done profiling to remove the EQATEC assembly from your package as well as remove the post-build step. \u00a0Leaving them in will decrease your project&#8217;s performance.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to profile a SharePoint 2010 project i&#8217;d been working on, in order to find some of the slower methods so that they could be improved. \u00a0I decided to give EQATEC Profiler a try since it had some good recommendations on StackOverflow and was FREE. EQATEC works by modifying and rebuilding your assemblies. \u00a0Since [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88,5],"tags":[71,93,70,90,92,66,76,320,91,89,22,24,69],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-performance","category-sharepoint","tag-assemblies","tag-assembly","tag-deployment","tag-eqatec","tag-eqatec-profiler","tag-global-assembly-cache","tag-package","tag-performance","tag-profiler","tag-profiling","tag-sharepoint-2","tag-sharepoint-2010","tag-visual-studio"],"_links":{"self":[{"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.visigo.com\/chriscoulson\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}