7

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

 2 years ago
source link: https://devblogs.microsoft.com/visualstudio/code-search-in-visual-studio-is-about-to-get-much-faster/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

Denizhan

January 26th, 202219

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 2022Side-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

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!

Denizhan Yigitbas

Product Manager

Follow


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK