-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
getOutliningSpans hangs on large, json-like file #27960
Comments
We can possibly pick an aribtrary high count of nodes to traverse and check the cancellation token ever |
The cancellation token disk access is already throttled. We don't need to meter when we check it, we just need to check it more. |
While at it I noticed that before carrying out operation we check for cancellation token and that is not throttled. (https://github.com/Microsoft/TypeScript/blob/master/src/server/session.ts#L556) we should use throttled cancellation token there as well. |
cc @ahejlsberg this case is a 6MB array literal. |
The problem with original file (dict-en.txt, or .js) is fixed for me in VS Code 1.36. I reported the original bug microsoft/vscode#60677. Thanks. If no other related problems are tracked under this ticket, it can be closed. |
From microsoft/vscode#60677
TypeScript Version: 3.2.0-dev.20181017
Search Terms:
Code
Open this file javaScript file in VS Code: dict_en.txt
Notice that intellisense and other features do not work.
Bug
This is caused by the
getOutliningSpans
request never returning. We do try to cancel the request on the VS Code side when you switch away from that file but it seems the TS Server does not pick up the cancellationPlayground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: