{"id":236409,"date":"2022-01-26T07:34:33","date_gmt":"2022-01-26T15:34:33","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=236409"},"modified":"2022-01-26T07:35:32","modified_gmt":"2022-01-26T15:35:32","slug":"code-search-in-visual-studio-is-about-to-get-much-faster","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/code-search-in-visual-studio-is-about-to-get-much-faster\/","title":{"rendered":"Code search in Visual Studio 2022 is about to get much faster"},"content":{"rendered":"<p>Visual Studio 2022 Find in Files is already more than 2x faster for 95% of searches compared to Visual Studio 2019. We wanted to make code search even better. I am excited to announce that Visual Studio 2022 17.1 Preview 3 introduces indexed Find in Files to make your search experience even faster! To try out the performance improvements yourself, download Visual Studio 2022 Preview:<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Download Visual Studio Preview<\/a><\/div><\/p>\n<p><figure id=\"attachment_236410\" aria-labelledby=\"figcaption_attachment_236410\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF.gif\"><img decoding=\"async\" class=\"wp-image-236410 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF.gif\" alt=\"Gif showing the difference between Find in Files search in VS 2019 and VS 2022\" width=\"1444\" height=\"547\" \/><\/a><figcaption id=\"figcaption_attachment_236410\" class=\"wp-caption-text\"><em>Side-by-side video of VS 17.0 (left) and VS 17.1 Preview (right) searching about 50,000 files in 1,560 projects<\/em><\/figcaption><\/figure><\/p>\n<h3>How has Visual Studio 2022 Code Searching Improved Compared to Visual Studio 2019<\/h3>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-236417\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph.png\" alt=\"Image FiF Graph\" width=\"1248\" height=\"691\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph.png 1248w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph-300x166.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph-1024x567.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/01\/FiF-Graph-768x425.png 768w\" sizes=\"(max-width: 1248px) 100vw, 1248px\" \/><\/a><\/p>\n<p>The above graph illustrates the major improvements we have seen in search performance for the 95<sup>th<\/sup> percentile of searches executed since Visual Studio 2019. We see that 95% of searches in 17.1 Preview 3 find all matches to a search query in just over 1 second! For many search scenarios, this search experience will now feel instantaneous\u2026any developers dream.<\/p>\n<h3>How does 17.1 Preview 3\u2019s indexed Find in Files work?<\/h3>\n<p>To make sure indexed searching is enabled, go to Tools &gt; Options &gt; Environment &gt; Preview Features and verify that &#8220;Enable indexing for faster find experience&#8221; is checked!<\/p>\n<p>From then on, at solution load or folder open, Visual Studio launches a satellite process \u2018ServiceHub.IndexingService.exe\u2019 and transmits a list of files to it to index. The indexer then scrapes through the files and constructs an index of all of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/N-gram\">n-gram<\/a>s contained in each file.<\/p>\n<p>When the user performs a \u2018Find\u2019, this index is used to prune files from the search so that it completes more quickly.<\/p>\n<p>The indexing process avoids impacting solution load, build, and user activities by running at Below Normal <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/procthread\/scheduling-priorities\">operating system priority<\/a> outside of the main Visual Studio process.<\/p>\n<h3>Try it out and share your feedback!<\/h3>\n<p>We would love to get your feedback on our updated search performance so please give it a try and let us know what you think! You can share any feedback via <a href=\"https:\/\/developercommunity2.visualstudio.com\/home\">Developer Community<\/a> to help us make Visual Studio better for you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2022 Find in Files is already more than 2x faster for 95% of searches compared to Visual Studio 2019. We wanted to make code search even better. I am excited to announce that Visual Studio 2022 17.1 Preview 3 introduces indexed Find in Files to make your search experience even faster! To try [&hellip;]<\/p>\n","protected":false},"author":78633,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[],"class_list":["post-236409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 2022 Find in Files is already more than 2x faster for 95% of searches compared to Visual Studio 2019. We wanted to make code search even better. I am excited to announce that Visual Studio 2022 17.1 Preview 3 introduces indexed Find in Files to make your search experience even faster! To try [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/236409","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\/78633"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=236409"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/236409\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=236409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=236409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=236409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}