January 26th, 2022
heart2 reactions

Code search in Visual Studio 2022 is about to get much faster

Senior Product Manager

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:

Gif showing the difference between Find in Files search in VS 2019 and VS 2022
Side-by-side video of VS 17.0 (left) and VS 17.1 Preview (right) searching about 50,000 files in 1,560 projects

How has Visual Studio 2022 Code Searching Improved Compared to Visual Studio 2019

Image FiF Graph

The above graph illustrates the major improvements we have seen in search performance for the 95th 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…any developers dream.

How does 17.1 Preview 3’s indexed Find in Files work?

To make sure indexed searching is enabled, go to Tools > Options > Environment > Preview Features and verify that “Enable indexing for faster find experience” is checked!

From then on, at solution load or folder open, Visual Studio launches a satellite process ‘ServiceHub.IndexingService.exe’ 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 n-grams contained in each file.

When the user performs a ‘Find’, this index is used to prune files from the search so that it completes more quickly.

The indexing process avoids impacting solution load, build, and user activities by running at Below Normal operating system priority outside of the main Visual Studio process.

Try it out and share your feedback!

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 Developer Community to help us make Visual Studio better for you!

Author

Denizhan Yigitbas
Senior Product Manager

Denizhan is a senior product manager who has spent his last 3 years focusing on improving developer productivity across a broad landscape of Microsoft developer products. Denizhan has had the opportunity to work on improving Visual Studio IDE, launching the C# Dev Kit VS Code extension, and working on early incubation technology for GitHub Copilot.

26 comments

Discussion is closed. Login to edit/delete existing comments.

Sort by :
  • Alain Robin

    Hello
    A speed comparison with vschromium would be interesting.
    Thanks.

  • valii · Edited

    Enabling the search indexing option on my solution with 20+ projects inside, made the search in files unworkable with the search never ending and finding nothing.

    In fact what i noticed is that with every new update visual studio is getting slower and slower and not any faster as advertised

    • Josiah Bills

      I have the same issue. Is there a devcommunity feedback item tracking this that I can upvote?

      • Schmidt, Michel

        Late to the party, seeing this as well. There was a community issue filed, here.

      • Christian GundermanMicrosoft employee

        Thank you for reporting this issue, can you please use the Help > Send Feedback > Report a Problem menu command to report this to Developer Community website. Doing so will send diagnostic information and logs that we can use to diagnose the issue.

  • Sam Wheat · Edited

    As far as I know there is still no robust, working, markdown editor for VS. Mads wrote this one a while back but it badly needs attention – and has for a very long time. I would much rather have resources devoted to items like this versus racking up trophy points in a search tool that is already fast enough for the majority.

    • Mads KristensenMicrosoft employee

      I agree that it would be great with a full markdown editing experience built into Visual Studio. In the meantime, you might be pleased to know that I’ve completely rewritten the markdown extension for VS 2022 and in the processed fixed most of the open issues with the old versions. Grab it here: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor2

      • Sam Wheat · Edited

        Thanks Mads, that is great news! Do you plan to support md-template? I really need that for a static documentation site I maintain.
        Have been blocked by this issue for a while.