redhat-developer / redhat-developer/lsp4ij

semanticTokens/full timeout too fast, need an option to increase latency to be beyond 5 seconds

Open
#723 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug semantic tokens
Dominant language
Java
Stars
344
Forks
113
Avg merge
5h 22m
Merged PRs (30d)
15

Description

(tested on Scala 2.13 + metaLS)

this is part of the log on my project:

[Trace - 20:21:19] Sending request 'textDocument/semanticTokens/full - (46)'.
Params: {
  "textDocument": {
    "uri": "file:///home/peng/git/spookystuff/prover-commons/module/core/src/main/scala/ai/acyclic/prover/commons/graph/Engine.scala"
  }
}


[Trace - 20:21:24] Sending notification '$/cancelRequest'
Params: {
  "id": "46"
}


[Trace - 20:21:24] Received response 'textDocument/semanticTokens/full - (46)' in 4935ms.
No response returned.
Error: {
  "code": -32800,
  "message": "The request (id: 46, method: \u0027textDocument/semanticTokens/full\u0027) has been cancelled"
}


[Trace - 20:21:24] Sending request 'textDocument/semanticTokens/full - (47)'.
Params: {
  "textDocument": {
    "uri": "file:///home/peng/git/spookystuff/prover-commons/module/core/src/main/scala/ai/acyclic/prover/commons/graph/Engine.scala"
  }
}


[Trace - 20:21:57] Sending notification '$/cancelRequest'
Params: {
  "id": "47"
}


[Trace - 20:21:57] Received response 'textDocument/semanticTokens/full - (47)' in 32945ms.
No response returned.
Error: {
  "code": -32800,
  "message": "The request (id: 47, method: \u0027textDocument/semanticTokens/full\u0027) has been cancelled"
}


[Trace - 20:21:57] Sending request 'textDocument/semanticTokens/full - (48)'.
Params: {
  "textDocument": {
    "uri": "file:///home/peng/git/spookystuff/prover-commons/module/core/src/main/scala/ai/acyclic/prover/commons/graph/Engine.scala"
  }
}

after 5 seconds the request will be canceled without a reason and replaced with a new request.

Some languages compiles slower than others, we probably need a new workflow to ensure that ongoing request won't timeout prematurely

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the LSP client's handling of textDocument/semanticTokens/full and the $/cancelRequest notifications shown in the report. Determine where the five-second cancellation is enforced and how an increased or configurable latency should preserve ongoing requests; done means slow semantic-token requests are not canceled prematurely and the behavior is covered by the project's relevant checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
performance, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.