Skip to content

Interrupt references code lens requests if user performs an action #60213

@mjbvz

Description

@mjbvz

Repo

  1. With "typescript.referencesCodeLens.enabled": true
  2. Load file that has lots of references that take a while to resolve
  3. 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.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuestypescriptTypescript support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions