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
{{ message }}
Repository navigation
Finding “\n” using regular expression is very slow in a file containing a lot of lines #41503
changed the title [-]Find “\n” using regular expression is very slow in a file containing a lot of lines[/-][+]Finding “\n” using regular expression is very slow in a file containing a lot of lines[/+]on Jan 12, 2018
alexandrudima It seems that I can only reproduce this issue on Windows platform. It is fast on my Linux PC. It takes me 4 to 20 seconds to search for \n on Windows, depending on the hardwares.
alexandrudima I have tested your fix on version 1.20.0-insider (84991c4). Searching for \n is fast on Windows now, but searching for .\n is still very slow. Still, this problem only appears on Windows.
Activity
[-]Find “\n” using regular expression is very slow in a file containing a lot of lines[/-][+]Finding “\n” using regular expression is very slow in a file containing a lot of lines[/+]alexdima commentedon Jan 18, 2018
On my machine, searching for
\nin a file with 25k lines is dominated by:\n20k timesI can look into optimizing this specific search (~40ms), as searching for
\nis trivial.EFanZh commentedon Jan 19, 2018
alexandrudima It seems that I can only reproduce this issue on Windows platform. It is fast on my Linux PC. It takes me 4 to 20 seconds to search for
\non Windows, depending on the hardwares.EFanZh commentedon Jan 23, 2018
alexandrudima Did you test it on Windows? I couldn’t reproduce it on Linux, so I think this is a platform-specific issue.
EFanZh commentedon Jan 24, 2018
alexandrudima I have tested your fix on version 1.20.0-insider (84991c4). Searching for
\nis fast on Windows now, but searching for.\nis still very slow. Still, this problem only appears on Windows.Fixes microsoft#41503: Add fast path for searching for \n