Skip to content

Language server takes a long time to respond to requests #7758

@samestep

Description

@samestep

For instance, here is a snippet of the message log from v1.10.0 of the Slang VS Code extension, after setting "slangLanguageServer.trace.server": "messages" and saving main.slang from juliusikkala/slang-simple-vulkan:

[Trace - 3:43:55 PM] Sending request 'textDocument/formatting - (10)'.
[Trace - 3:43:55 PM] Sending request 'textDocument/inlayHint - (11)'.
[Trace - 3:43:55 PM] Sending notification '$/cancelRequest'.
[Trace - 3:43:55 PM] Sending request 'textDocument/inlayHint - (12)'.
[Trace - 3:43:55 PM] Sending request 'textDocument/documentSymbol - (13)'.
[Trace - 3:43:56 PM] Sending request 'textDocument/semanticTokens/full - (14)'.
[Trace - 3:43:58 PM] Received response 'textDocument/completion - (8)' in 3801ms.
[Trace - 3:43:58 PM] Received notification 'window/logMessage'.
[Info  - 3:43:58 PM] Server processed 2 commands, executed in 3768ms
[Trace - 3:43:58 PM] Received response 'textDocument/documentSymbol - (9)' in 3465ms.
[Trace - 3:43:58 PM] Sending request 'completionItem/resolve - (15)'.
[Trace - 3:43:58 PM] Received response 'textDocument/formatting - (10)' in 3427ms.
[Trace - 3:43:58 PM] Received response 'textDocument/inlayHint - (11)' in 3224ms. Request failed:  (-32800).
[Trace - 3:43:58 PM] Received response 'textDocument/inlayHint - (12)' in 3049ms.
[Trace - 3:43:58 PM] Received response 'textDocument/documentSymbol - (13)' in 2872ms.
[Trace - 3:43:58 PM] Received response 'textDocument/semanticTokens/full - (14)' in 2434ms.

The one I initially noticed was the textDocument/formatting request, because I have "editor.formatOnSave": true and so this is causing a multiple-second delay every time I try to save a *.slang file. However, this log also shows several other requests taking a similarly long time.

I tested this on x86 Ubuntu. Some things I tried that did not change anything:

  • Just wait and keep editing/saving the file in case the language server was still indexing/caching things.
  • Explicitly set slang.slangdLocation to point to a prebuilt binary I downloaded from the Slang v2025.12.1 release.
  • Remove clang-format from my PATH in case formatting itself is just taking a long time.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions