Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching in Visual Studio 2013, 2015 hangs when results are in minified files (single long line)

We have a web project with Angular, jquery and Telerik Kendo.

When searching for any text Ctrl+Shift+F that is then found in any of their *.min.js or *.js.map files, the VS (both 2013 and now 2015) will become unresponsive for 30-60s. Also when later I scroll the Find Result 1 window, it will momentarily become unresponsive when long line becomes visible. Everything becomes smooth again if I clear the search results from Find Result 1.

We have the *.min.js and *.js.map files included in project itself. Is this wrong approach?

like image 551
Pasi Savolainen Avatar asked Jul 24 '15 06:07

Pasi Savolainen


2 Answers

This is a well known problem, the Connect feedback article is here. These files are poison pills to an IDE, compare to this Q+A.

Little to add, beyond not adding them to your project, the proposed workaround in the article is the obvious one. And as long as you need to search through these files you surely want to work with the non-minimized versions of them.

like image 95
2 revs Avatar answered Nov 16 '22 02:11

2 revs


In the Find options, expand "Result options" (Alt+S) and enable "Display file names only". The contents of the files will not be displayed in the find results and everything will be a lot faster. You can still double click a file name in the find results to go to the exact location of the match in that file.

like image 31
Steven Liekens Avatar answered Nov 16 '22 02:11

Steven Liekens