You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users run find in a single file, we will run regex line by line originally. Now we have a text buffer which stores content in chunks instead of lines, running regex on chunks directly can avoid the overhead of getLineContent.
Things to note while doing this optimization
When a line sits across Piece Tree nodes/buffers, we fall back to getLineContent then search.
When users search by multiline regex, we need to get the whole content and then search, like before.
When users search by single line regex, but the regex contains ^, $ or similar, executing this kind of regex on chunks will miss matches when there are line breaks.
The text was updated successfully, but these errors were encountered:
This is probably related, but feel free to open another issue if its not:
When opening a large log file (30k lines in my case), I can reliably freeze the window just using search. Steps to reproduce:
Open large file
Enter the following in the search box with regex enabled: $\n
As soon as the n is entered, VSCode freezes and asks me a couple of seconds later if I want to restart the current window.
Version 1.21.1
Commit 79b44aa704ce542d8ca4a3cc44cfca566e7720f1
Datum 2018-03-14T14:47:13.351Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architektur ia32
When users run find in a single file, we will run regex line by line originally. Now we have a text buffer which stores content in chunks instead of lines, running regex on chunks directly can avoid the overhead of
getLineContent
.Things to note while doing this optimization
getLineContent
then search.^
,$
or similar, executing this kind of regex on chunks will miss matches when there are line breaks.The text was updated successfully, but these errors were encountered: