Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenization freezes with long line like "((a+a) (a+a) (a+a) (a+a) ... #174

Open
alexr00 opened this issue Feb 3, 2020 · 0 comments
Open

Comments

@alexr00
Copy link

alexr00 commented Feb 3, 2020

From @Maxpxt in microsoft/vscode#89846

Details

What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.)
VS Coe
What version of the editor are you using?
VS Code version: Code 1.41.1 (26076a4, 2019-12-18T14:58:56.166Z)
What color theme are you using?
Not applicable

Repro

Create a file in plain text mode and fill it with:
((a+a) + ~30 times  (a+a), which looks like ((a+a) (a+a) (a+a) (a+a) ...

Change the file language to C#.

This causes VSCode to stop responding.

This does not happen with other languages like C++, F#, Java, JavaScript.

Interestingly, in the following slight variations of this, everything works fine.

( on line 1 + (a+a) (a+a) (a+a) (a+a) ... on line 2
((a+a)(a+a)(a+a)(a+a) ...
When the line is smaller (around 15 to 20 times  (a+a)), the the editor does not stop responding, but takes long to respond to any changes made to the file (like typing a letter). The larger the line, the longer it takes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant