{"id":238402,"date":"2022-06-09T09:00:57","date_gmt":"2022-06-09T16:00:57","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=238402"},"modified":"2022-06-08T23:48:29","modified_gmt":"2022-06-09T06:48:29","slug":"new-profiler-feature-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/new-profiler-feature-in-visual-studio\/","title":{"rendered":"New Profiler feature in Visual Studio"},"content":{"rendered":"<h2 aria-level=\"1\"><span data-contrast=\"none\">Introducing the new File I\/O tool<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">We just launched a <\/span><b><span data-contrast=\"auto\">new profiling tool <\/span><\/b><span data-contrast=\"auto\">in Visual Studio 17.2 that helps you understand how you can optimize your File I\/O operations to improve performance in your apps. If you\u2019re trying to investigate and diagnose slow loading times, the new<\/span><b><span data-contrast=\"auto\"> File IO tool<\/span><\/b><span data-contrast=\"auto\"> can help you understand how the I\/O operations impact your spent time.<\/span><\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\" https:\/\/visualstudio.microsoft.com\/downloads\/ \" target=\"_blank\">Download the latest version of Visual Studio<\/a><\/div><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">How to use File IO<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Select <\/span><b><span data-contrast=\"auto\">Alt+F2<\/span><\/b><span data-contrast=\"auto\"> to open the Performance Profiler in Visual Studio.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Select the <\/span><b><span data-contrast=\"auto\">File IO <\/span><\/b><span data-contrast=\"auto\">check box along with any other cooperative tools you might need.<\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch.png\"><img decoding=\"async\" class=\"alignnone wp-image-238403 size-large\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch-1024x593.png\" alt=\"Image file io launch\" width=\"640\" height=\"371\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch-1024x593.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch-300x174.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch-768x445.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-launch.png 1100w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Select <\/span><b><span data-contrast=\"auto\">Start <\/span><\/b><span data-contrast=\"auto\">to run the tool.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Select <\/span><b><span data-contrast=\"auto\">Yes<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">After the tool starts running, go through the scenario you want to profile in your app. Then select <\/span><b><span data-contrast=\"auto\">Stop collection<\/span><\/b><span data-contrast=\"auto\"> or close the app to see your data.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2><span data-contrast=\"none\">View file read and write information to improve perf<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">The File IO tool provides file read and write information with files read during the profiling session and can help you diagnose performance issues such as inefficient data read or write patterns. The files are autogenerated in a report after collection and arranged by their target process with aggregate information displayed.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after.png\"><img decoding=\"async\" class=\"alignnone wp-image-238405 size-large\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after-1024x303.png\" alt=\"Image file io after\" width=\"640\" height=\"189\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after-1024x303.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after-300x89.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after-768x227.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-after.png 1099w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW92764857 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW92764857 BCX0\">If you right-click on one of the rows, you can go to the source in your code. <\/span><span class=\"NormalTextRun CommentStart SCXW92764857 BCX0\">If an aggregate row was read multiple times,<\/span><span class=\"NormalTextRun SCXW92764857 BCX0\"> expand it to see the individual read operations for that file with its frequency, if they were read multiple times.<\/span><\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02.png\"><img decoding=\"async\" class=\"alignnone wp-image-238406 size-large\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02-1024x341.png\" alt=\"Image 2022 05 23 23 44 02\" width=\"640\" height=\"213\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02-1024x341.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02-300x100.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02-768x256.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/2022-05-23_23-44-02.png 1481w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Duplication Factor<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">The best part of the File IO tool is the <\/span><b><span data-contrast=\"auto\">Duplication Factor<\/span><\/b><span data-contrast=\"auto\"> feature because it can help you make informed decisions about where you can reduce the read or processing time. Duplication Factor shows if you&#8217;re reading or writing more than what you need to from the file. If you have a duplication factor of 3x, that means the number of bytes you&#8217;re reading from the file is 3 times the size of the file itself, which may be an indication that you&#8217;re reading, and processing more than you realized. This can indicate a place where caching the result of the file read and processing could improve your app&#8217;s performance. <\/span><span data-contrast=\"auto\">\ud83d\udd25<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:257}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor.png\"><img decoding=\"async\" class=\"alignnone wp-image-238407 size-large\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor-1024x453.png\" alt=\"Image file io duplication factor\" width=\"640\" height=\"283\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor-1024x453.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor-300x133.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor-768x340.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor-1536x680.png 1536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-duplication-factor.png 1642w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Backtraces view<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Double-clicking any file will cause it to be loaded in the <\/span><b><span data-contrast=\"auto\">Backtraces<\/span><\/b><span data-contrast=\"auto\"> view. This view loads for any file in either reads or writes, allowing you to see where the read or write is happening in your code.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces.png\"><img decoding=\"async\" class=\"alignnone wp-image-238408 size-large\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces-1024x307.png\" alt=\"Image file io backtraces\" width=\"640\" height=\"192\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces-1024x307.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces-300x90.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces-768x230.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/06\/file-io-backtraces.png 1100w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Try it<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">We would love to get your feedback on File IO so please try it and let us know what you think via this <\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Improve-the-File-IO-tool-in-the-Visual-S\/10045570?space=8&amp;entry=suggestion\"><span data-contrast=\"none\">suggestion ticket.<\/span><\/a><span data-contrast=\"auto\"> Let us know how it could help your app\u2019s performance in the comments.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:257}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">You can also leave us feedback on other profiling tools <\/span><a href=\"https:\/\/www.surveymonkey.com\/r\/QX6P82R\"><span data-contrast=\"none\">in this survey<\/span><\/a><span data-contrast=\"auto\">.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:257}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Learn more about other Performance Profiler improvements in our recent <\/span><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/cpu-usage-tool-improvements\/\"><span data-contrast=\"none\">blog post<\/span><\/a><span data-contrast=\"auto\"> and how we doubled performance in under 30 minutes in this <\/span><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/case-study-double-performance-in-under-30-minutes\/\"><span data-contrast=\"none\">case study<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:257}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introducing the new File I\/O tool\u00a0 We just launched a new profiling tool in Visual Studio 17.2 that helps you understand how you can optimize your File I\/O operations to improve performance in your apps. If you\u2019re trying to investigate and diagnose slow loading times, the new File IO tool can help you understand how [&hellip;]<\/p>\n","protected":false},"author":7042,"featured_media":238407,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[237,3835,53,6821,6743,6803],"class_list":["post-238402","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-net","tag-diagnostics","tag-performance","tag-performance-improvements","tag-profiling","tag-visual-studio-profiler"],"acf":[],"blog_post_summary":"<p>Introducing the new File I\/O tool\u00a0 We just launched a new profiling tool in Visual Studio 17.2 that helps you understand how you can optimize your File I\/O operations to improve performance in your apps. If you\u2019re trying to investigate and diagnose slow loading times, the new File IO tool can help you understand how [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/7042"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=238402"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238402\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/238407"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=238402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=238402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=238402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}