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
Interrupt references code lens requests if user performs an action #60213
Comments
Hi @mjbvz , I would like to pick this up. Might need some guidance. |
@mjbvz I tried loading a typescript file with more references after enabling |
To repo, just add a delay in https://github.com/Microsoft/vscode/blob/797161bd324200dcaf1cf297998a92b84c70ea9d/extensions/typescript-language-features/src/features/referencesCodeLens.ts#L19 The main point that needs to be updated to fix this issue is the request queue: https://github.com/Microsoft/vscode/blob/797161bd324200dcaf1cf297998a92b84c70ea9d/extensions/typescript-language-features/src/server.ts#L77 Instead of a generic |
Merged in priority work but still needs code changes so we can use this in the references requests |
Use a larger file such as |
Repo
"typescript.referencesCodeLens.enabled": true
Bug
We only return the completion result after the references requests are all resolved. This may take a little while.
Root Cause
VS Code calls
resolveCodeLens
for all visible references. This results in a number of requests being queued up against the TS server when we first load a file. Since VS Code's server communication queue is sequential and the TS server is single threaded, this means that any completions request must wait for all of the references requests to process before it can be sentPotential fix would be to introduce the concept of a lo-priority request that other requests move in front of. Lo-pri requests already in progress would not be cancelled, but this would keep us from waiting until all code lenses are resolved before continuing.
The text was updated successfully, but these errors were encountered: