-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
Repo
- With
"typescript.referencesCodeLens.enabled": true - Load file that has lots of references that take a while to resolve
- While the references are still coming in, request completions
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 sent
Potential 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.