LuaLS / LuaLS/lua-language-server

editor.codeActionsOnSave with extension slows down file saving in VS Code

Open
#2,297 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows 11 Pro 22H2 22621.2134

What is the issue affecting?

Other

Expected Behaviour

I have a huge lua file with a ~3k lines in a big workspace folder with ~1k lua files.
I expect that the file is saved instantly, as it was before when I used Windows 10.

Actual Behaviour

But a week ago I switched to Windows 11 and now I noticed that saving the file takes about 2 seconds.
When the lua-language-server extension is disabled in VS Code, the file is saved instantly.
I tried to set Workspace Event - None and disable Diagnostics but it didn't help

Reproduction steps
  1. Change large lua file
  2. Press Ctrl+S
  3. Wait 2 seconds before the extension allows VS Code to save the file to disk
Additional Notes

I found a stall message
изображение

File saving "sv_player.lua": Getting the code action from "'Lua'"
([configure] (command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D)).
Log File

No response

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

No source file or test is named. Reproduce the delay in Visual Studio Code with the large Lua file and workspace described, then trace the extension's editor.codeActionsOnSave handling and the "Getting the code action" stall. Done means saving no longer incurs the reported delay with the extension enabled, with regression coverage for the scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, vscode
Domain
devtools, performance
Issue type
Bug
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.