Skip to content

High CPU usage and autocompletion breaking on Windows #612

Closed
@tomwyr

Description

@tomwyr

Describe the bug
Opening a new file and just changing language mode to Swift causes multiple cores of the CPU to kick in and never stop, even when the source file is still empty. Also, the autocompletion doesn't seem to work and, as soon as there's an error introduced to the code, the analyzer hangs at displaying that particular error unless I restart vscode or the LSP.

Expected behavior
Autocompletion doesn't break and CPU usage is low when LSP has nothing to be busy with.

Environment

  • OS: Windows 11
  • Swift version: compnerd.org Swift version 5.9 (swift-5.9-RELEASE) Target: x86_64-unknown-windows-msvc
  • Visual Studio Code version: 1.82.2
  • vscode-swift version: 1.5.2

Additional context
The red lines on the screenshots mark the moment where language mode is changed to Swift and (I assume) the vscode extension gets activated.

1
2
3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsourcekit-lspSourceKit-LSP issuewindowsIssue specific to Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions