-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
Syntax coloring is slow #44373
Comments
To confirm, this reproduces only when extensions are enabled? If so, this is likely caused by an extension. How large/what type of file does this happen for? |
Extensions don't seem to affect. It happens even to a small file but the delay is less than one second and that's only a minor nuisance. But with longer code file with 1000 lines the delay can be more than one second. JS or JSX seem to be slower than CSS. Anyway, this is weird because I have quite powerful machine and this is not even a heavy computational operation. |
I can repro easily. Open "tsc.js" from TypeScript node module ( |
Our current tokenization engine goes from the top to the bottom and this engine with a rich grammar (TypeScript) can be slow. |
@rebornix Can we do anything about this on the TypeScript grammar side of things? |
@mjbvz right now the problem with our grammars is we only know the time is spent in Regex searching but we don't know which part
Maybe we can try to add some tracing into vscode-textmate and find something interesting. |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
This is still not fixed. Try a 60k LOC C++ file. It takes 10 seconds to color it. Pathetic. |
For C++, could the line be colored gray if the line starts with |
For anyone arriving, this is a dupe of #64681 |
Issue Type
Bug
Description
Syntax coloring is slow and I can see white text for a while. How come in Sublime Text I don't? Otherwise I like VSCode more.
VS Code Info
VS Code version: Code 1.20.1 (f88bbf9, 2018-02-13T15:23:28.607Z)
OS version: Darwin x64 17.4.0
System Info
Extensions (2)
The text was updated successfully, but these errors were encountered: