News

How Latest Visual Studio 2022 Update Speeds Code Search

The recently released Visual Studio 2022 17.1 Preview 3 improves code search even more than gains made in the jump from VS 2019 to VS 2022.

As we reported in September 2021 coverage of VS 2022 17.0 Preview 4, Find in Files was already 3x faster when searching large solutions.

According to a new Jan. 26 post on Microsoft's developer blogs site, the dev team is continuing to boost the search performance.
Code Searching Improvements from VS 2019 to VS 2022
[Click on image for larger view.] Code Searching Improvements from VS 2019 to VS 2022 (source: Microsoft).

"Visual Studio 2022 Find in Files is already more than 2x faster for 95 percent of searches compared to Visual Studio 2019," said product manager Denizhan Yigitbas. "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!"

The functionality is enabled by going to Tools > Options > Environment > Preview Features and verifying that "Enable indexing for faster find experience" is checked.

Side-by-Side Animated GIF of VS 17.0 (left) and VS 17.1 Preview (right) Searching About 50,000 Files in 1,560 Projects
[Click on image for larger view.] Side-by-Side Animated GIF of VS 17.0 (left) and VS 17.1 Preview (right) Searching About 50,000 Files in 1,560 Projects (source: Microsoft).

Here's the explanation for how the indexing boost works:

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.

The preview can be downloaded here.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Copilot Engineering in the Cloud with Azure and GitHub

    Who better to lead a full-day deep dive into this tech than two experts from GitHub, which introduced the original "AI pair programmer" and spawned the ubiquitous Copilot moniker?

  • Uno Platform Wants Microsoft to Improve .NET WebAssembly in Two Ways

    Uno Platform, a third-party dev tooling specialist that caters to .NET developers, published a report on the state of WebAssembly, addressing some shortcomings in the .NET implementation it would like to see Microsoft address.

  • Random Neighborhoods Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the random neighborhoods regression technique, where the goal is to predict a single numeric value. Compared to other ML regression techniques, advantages are that it can handle both large and small datasets, and the results are highly interpretable.

  • As Some Orgs Restrict DeepSeek AI Usage, Microsoft Offers Models and Dev Guidance

    While some organizations are restricting employee usage of the new open source DeepSeek AI from a Chinese company due to data collection concerns, Microsoft has taken a different approach.

  • Useful New-ish Features in .NET/C#

    We often hear about the big new features in .NET or C#, but what about all of those lesser known, but useful new features? How exactly do you use constructs like collection indices and ranges, date features, and pattern matching?

Subscribe on YouTube

Upcoming Training Events