LuaLS / LuaLS/lua-language-server

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

オープン
#2,297 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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
![изображение](https://github.com/LuaLS/lua-language-server/assets/7351599/f8d95ef9-15da-4565-9b80-dad140331048)
```
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_

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ソースファイルもテストも指定されていません。説明されている大きな Lua ファイルと workspace を使って Visual Studio Code で遅延を再現し、その後、拡張機能の editor.codeActionsOnSave の処理と "Getting the code action" での停止を追跡してください。拡張機能を有効にした状態で保存しても報告された遅延が発生せず、このシナリオのリグレッションテストによるカバレッジが追加されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua, vscode
領域
devtools, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。