csharp-tmLanguage icon indicating copy to clipboard operation
csharp-tmLanguage copied to clipboard

Grammar is slow on a line with a very long string literal (with embedded json)

Open alexr00 opened this issue 2 years ago • 1 comments

Details

What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.) VS Code

What version of the editor are you using? 1.66 insiders and 1.65 stable.

What color theme are you using? N/A

Repro

This file has the issue - example.txt - although in the original it contained a bearer token, so I couldn't include verbatin - all chars replaced with x.

Originally reported by @kierenj in https://github.com/microsoft/vscode/issues/145876.

alexr00 avatar Mar 23 '22 15:03 alexr00

VSCode editor.maxTokenizationLineLength setting for C# is set to 2500 by default, and the line is 6920 long.

Increasing it to 10000 highlights the line immediately. image

wise0704 avatar Sep 04 '23 09:09 wise0704